## 1 Introduction  
The Internet of Things (IoT) is a global network of linked objects, each with its own identity, that allows data to be exchanged and turned into useful information. An additional definition of the IoT is a uniquely identified smart gadget and its virtual counterpart within an Internet-like framework. In 1999, the word \"IoT\" was first used. IoT resources use a variety of interconnected technologies, including RFID and Wireless Sensor Networks (WSNs), to share data [1]. Many IoT studies have recently been conducted to create a smarter environment. Sensing, networking, collaboration, and cloud computing technologies are all parts that form the fabric of the IoT world. With IoT, when sensor nodes (SNs) are mounted in a dense environment, a wide scale of applications such as monitoring wildfires, weather, traffic, intelligent buildings, and animals, become feasible with an Internet connection [2]. Technological developments in communication have led to a rapid expansion in the scope of IoT networks. The IoT network is comprised of several cheap, energy-constrained SNs that are employed to monitor environmental phenomena such as humidity, pressure, temperature, and seismic activity in a given area [3]. WSNs are the IoT's efficient routing and networking foundation [4]. It is rapidly developing technology with a wide range of real-time applications. A WSN is comprised of single or multiple sink nodes and many SNs that are randomly scattered in the sensor field and form a self-organizing network system through radio communication. WSNs have become a hot research area due to increased demand for a variety of applications. Reducing the energy consumption of SNs and extending network lifetime are two important design objectives for WSNs. WSN applications are currently primarily focused on environmental monitoring and protection, entertainment, medical care, traffic, military, industrial control, smart world, and other fields, such as the marine environment monitoring system, which has also become an important area. Sensing, processing, communication, and storage are all capabilities of a WSN. Physical environments can be measured by WSN for humidity, strain, light strength, temperature, and other factors [5; 6]. IoT is the expansion of smart objects and WSNs by interconnection of scattered and identifiable communication devices. Due to the availability of unbalanced resources and heterogeneous IoT connections, vitality utilization imperatives arise. SNs in an IoT network are made of batteries with inverters that monitor and/or receive environmental data, just like those in a WSN. SNs independently communicate detected data through cellular networks and inbuilt wireless radio. To communicate sensed data to remote users, they are connected to other networks, such as the Internet [7]. Routing protocols specify how nodes interact as well as how data are routed and distributed across the network [8; 9]. They can be categorized in a variety of ways. Most heterogeneous networks use hierarchical routing algorithms, in which certain SNs are more advanced and powerful than others; however, this is not always the case. SNs are gathered into clusters in hierarchical (clustering) protocols. It is generally accepted that hierarchical routing protocols are more cost-effective and have more flexibility in handling routing information than other classifications [10; 11; 12; 13]. Among the most studied hierarchical routing protocols are Low Energy Adaptive Clustering Hierarchy (LEACH), Hybrid Energy Efficient Distributed Clustering (HEED), Stable Election Protocol (SEP), and Distributed Energy Efficient Clustering protocol (DEEC) [14; 15; 16; 17]. Due to their significant impact on the lifetime of the network, energy heterogeneity has been implemented in WSNs. To increase the lifespan of the network, SEP is therefore suggested for two-level heterogeneous WSNs by adding energy heterogeneity [18]. Nodes are separated into advanced and normal nodes in this case, with the former having less energy than the latter.