Wireless sensor networks (WSNs) based on the Internet of Things (IoT) are now one of the most prominent wireless sensor communication technologies. WSNs are often developed for particular applications such as monitoring or tracking in either indoor or outdoor environments, where battery power is a critical consideration. To overcome this issue, several routing approaches have been presented in recent years. Nonetheless, the extension of the network lifetime in light of the sensor capabilities remains an open subject. In this research, a CUCKOO-ANN based optimization technique is applied to obtain a more efficient and dependable energy efficient solution in IoT-WSN. The proposed method uses time constraints to minimize the distance between sources and sink with the objective of a low-cost path. Using the property of CUCKOO method for solving nonlinear problem and utilizing the ANN parallel handling capability, this method is formulated. The resented model holds significant promise since it reduces average execution time, has a high potential for enhancing data centre energy efficiency, and can effectively meet customer service level agreements. By considering the mobility of the nodes, the technique outperformed with an efficiency of 98% compared with other methods. The MATLAB software is used to simulate the proposed model.

1. Introduction

Sensor nodes serve as the main backbone in wireless sensor networks (WSNs), which are among the most common wireless communication networks [1, 2]. In terms of sensor designs, WSNs can have either homogeneous or heterogeneous sensors, with numbers ranging from hundreds to thousands [3, 4]. Most WSNs are tailored to a specific use case, and their sensor nodes typically offer fundamental functions including sensing, processing, computation, and communication [5]. The communication is mostly done with neighboring nodes using radio frequency electromagnetic pulses [6].

Wireless sensor networks (WSNs) based on the Internet of Things (IoT) have recently opened up a new exciting arena for novel and new sorts of applications [710]. The small and active sensor nodes are the basic structure of WSNs that monitor their surroundings, analyses data (in few cases), and send/receive refine/processed data to/from other neighboring sensor nodes. In the centralized network, these sensing nodes are spread across the defined area connecting base node with sink node [11]. In centralized networks, the sink collects sensor data for end-user use. In certain situations, the sink can also send network pol to sensor nodes to activate them [12, 13]. Figure 1 depicts the basic general architecture of the WSNs encountered in this investigation. The message is sent from the source sensor to the sink sensor via the most efficient way feasible, which includes the use of other random sensors [1416].

In contrast to most existing research, which focuses on a specific element of WSNs [17], we define an Energy Driven Architecture (EDA) as a new architecture for decreasing the total energy consumption of WSNs. The architecture specifies the network’s generic and important energy-consuming parts. WSNs are deployed using EDA as a constituent-based architecture based on energy dissipation through their components. This perspective on overall energy use in WSNs can be used to optimize and balance energy utilization while also extending network lifetime. The main objective of this research is as follows: (1)To find the best possible routes to transfer message from source sensor node to sink sensor node(2)To reduce the route cost for transferring the message

After extensive literature survey, it was found that CUCKOO method is very effective in solving nonlinear problems and when combines with ANN which have advantage of parallel processing make CUCKOO-ANN a best combination for this research work. The presented model’s goal is to provide a high-performance, low-power computer infrastructure that also meets an energy-efficient and secure service mode.

The following contributions are highlighted in this paper in this regard: (1)Using CUCKOO-ANN based optimization technique for reducing total cost of the path(2)The IoT-WSN is placed optimally to transfer message from sink to source with minimum time constraints

2. IoT-WSN Background and Problem Formulation

2.1. IoT-WSN Architecture

Installing IoT technology in residential and commercial buildings enables businesses and individuals to measure their energy use and make changes to reduce demand and boost efficiency. Buildings, whether commercial, residential, or industrial, have a substantial influence on the environment as well as the overall cost of energy use. IoT sensors may be installed throughout a building and send real-time energy use data to a data centre for analysis. Organizations may utilize IoT to monitor important assets such as equipment, air conditioning systems, water heating systems, large refrigerating units, and lighting systems on an individual basis [18, 19]. Small batteries and power harvesting techniques power IoT-WSN sensors, which are often put in inaccessible places; replacing batteries is not an option [20]. Not only does using a battery shorten the sensor’s lifespan, but it also makes WSN design and management more challenging. However, energy scarcity has prompted extensive study into WSNs at all layers of the protocol stack. The OSI model and the Internet, for example, are functional models arranged as layers, with each layer offering services to the layer above it (for example, the application layer delivers services to end users) [21, 22]. The quality of a network’s service parameters is routinely evaluated, including availability, delay, throughput, jitter, dependability, and even security [23]. However, there are various issues when it comes to energy consumption (EC), because there is no comprehensive model for analyzing and optimizing the network that includes EC. Most current energy minimization models [24] focus on sending and receiving data, while other parameters are ignored. The power consumption model in [25, 26] focused on the cost of sending and receiving data and calculated the upper limit of single hop distance energy efficiency [27]. This method proposes an intermediate node between the source and the destination in order to conserve energy during retransmission. Other ways use the power consumption model described in [25] to assess the energy efficiency of wireless sensor networks.

In the physical layer of WSN, a radio connection communication system is implemented which consume energy whenever the signal is transmitted with in the sensor network. The physical layer modulates and codes data in the transmitter, and it must optimally decode data in the receiver. Idle, sleep, and active are the three modes of the radio channel. The time and energy required to switch between different modes and transmit and receive states must be reduced in order to save energy.

Furthermore, a low-power listening method may also be utilized at the physical layer, with the key idea being to turn on the receiver periodically to sample the incoming data. This duty-cycle method decreases the network’s idle listening overhead [28]. Furthermore, sending and receiving data consume the same amount of energy on the radio channel; energy-efficient MAC protocols must maximize sensor sleep time [29]. Due to real-time monitoring and interaction with different aspects of a sensing node, the operating system (OS) is probably the ideal place to optimize and manage energy usage of a WSN at the node level. Clustering is another strategy for reducing energy consumption while ensuring that deadlines are met. Clustering, on the other hand, has a technical limitation: it can only be employed in wireless sensor clusters with DVS processors and compute capability [3032]. To overcome this problem, the paper suggests a new approach as stated in next sections.

2.2. Problem Formulation for Energy Module

The goal of this research is to reduce and conserve energy in WSNs. CUCKOO search is used in the initial phase to construct static clusters to reduce the use of energy sensor nodes. According to [33], the radio model used is the most commonly used assumptions, and models in sensor network simulation and analysis are listed below.

Nodes are spread in a 2-dimensional space at random in a uniform distribution, and all sensors are aware of the location of the Base Station (BS). Depending on the distance to the receiver, the nodes can transmit at different power levels. The nodes have no idea where they are. If the transmit power level is known, the nodes may estimate the approximate distance using the received signal intensity, and communication between nodes is not affected by multipath fading. Here, a network operating model based on rounds is used, similar to that of LEACH and HEED [34, 35]. A clustering phase precedes the data collection phase in each round.

Equations (1) and (2) give the amount of energy consumed for transmission (Watts) of a l-bit message across a distance (meters). The energy expended per bit during the execution of the transmitter, or receiver circuit is represented by the . (Watts) is energy consumed by the amplifier. The main aim of this research is to minimize the .

3. Proposed CUCKOO-ANN Optimization Modeling for IoT-WSN

The energy consumption of IoT-WSN depends on the distance and the message bit. To have the efficient system CUCKOO-ANN based model is proposed as shown in Figure 2. The CUCKOO search has three stage as described below: (1)Stage 1. Random placement of eggs(2)Stage 2. The finest nest having good quality of eggs is selected and carried over for next generation(3)Stage 3. Probability of getting discovered by the host bird nest

Taking into account these three stages of CUCKOO search, it increases the system effectiveness for global optimizations by maintaining a balance between global random walk and local random walk. The output of CUCKOO search regarding to possible best nests is used as input for the ANN. The output of ANN is the best efficient path having the lowest cost in terms of path from source to sink leads to energy efficient system.

3.1. Proposed CUCKOO Search Modeling for Possible Best Nests

The aim of the CUCKOO search in IoT-WSN is to find all the best possible path to send the message from the source sensor to the sink sensor by using the random sensors present in the vicinity. This is achieved using the nature of the CUCKOO which lay eggs in the range of 2-10, which can be used as lower and upper limit of egg dedication to each CUCKOO involved. The second habit is they try to lay eggs at maximum distance from their source habitat. The flow chart in Figure 3 shows the use of CUCKOO search for finding the best possible route from source sensors to base/sink sensor. For selecting best sensor nodes for message transfer, the fitness function of each random node must be calculated using the equation: where are the constants and having a value range from 0 to 1. The fitness 1, 2, and 3 is calculated using the equations:

Here, is the number of nodes in the system, and are the source node and sink/base node, (Watts) is the total energy of the node in watts, and is the number of CUCKOOs assigned. After calculating the fitness function of each node, the best nodes having high fitness values nodes are chosen for sending the message. For the selection of the best route, cost of each route is evaluated using the equation:

The is the function of distance between the random nodes present in the system, and is the function of energy consumption of the nodes. The expression for and is given in equations (6) and (7).

Minimum value of and helps to obtain the best cost and subsequently best possible routes. The possible best route is served as input to the ANN network as shown in Figure 2. The next section gives the details about the ANN modeling regarding the best route and minimum time to send the message from source to base/sink sensor node.

3.2. Proposed ANN Modeling for Possible Best Solution

The best possible nodes are identified by the CUCKOO search in the previous section. Using the best nodes and possibility of best path is used as input for the ANN model. In this model, the best 3 possible input is considered from CUCKOO search. A total of 30 hidden layer neurons is used to get the best output. The steps required to get the best solution consist of low cost, and low energy use using ANN is given below:

Step 1. Find the best possible routes using the fittest sensor nodes.

Step 2. Which route has minimum number of sensor nodes involvement.

Step 3. Train the neural network for minimum cost leads to minimum energy consumption.

Step 4. If simulation round over stop, otherwise simulate for possible solution.

Step 5. Compute the performance of the different parameters required.

4. Result and Discussion

4.1. Simulation Results

The following result is obtained from the proposed CUCKOO-ANN method. The simulation parameters required for the proposed method are given in Table 1. First, the IoT-WSN is placed in two-dimension coordinates as shown in the simulation (Figure 4). The green color indicates the sensor with their sensor number. The CUCKOO search gives the fitness parameters for different rounds of simulation. Figure 5 shows the last 10 best fitness parameters of simulation. The range of fitness parameters are well in ranged for best results.

The CUCKOO search finds the best sensor nodes which help the ANN to form the possible routes. The best possible routes find after the simulation is given in Table 2. The ANN estimate the cost of the route and find route 3 as the best route to transfer message from source to base/sink sensor. Through MATLAB simulation, the cost of route 3 is found to be 2.145.

The route cost of other four are as follow: for route 1, it is 3.897; for route 2, it is 2.892; for route 4, it is 3.110; and for route 5, it is 3.776. Although the method finds 28 best routes out of which only five best is mentioned. Figure 6 shows the simulation result for the cost for 201 iterations, and Figure 7 shows the best path selected by the CUCKOO-ANN based model. Just to verify, the saturation 201 simulation is done. The energy consumption for each round of simulation is showed in Figure 8. From simulation 196 to 201, the energy consumption is almost constant with very small deviation.

This highlights that the proposed algorithm learns from the previous errors and updates entire algorithm so that minimum energy path can be obtained. Figure 9 shows the predicted best nodes and route compare with the real data. The error % is almost 2% which indicate the proposed model is very effective in nature. The red dot shows the CUCKOO ANN predicted energy data for sensors, and blue dots show the real energy data of sensors.

4.2. Comparison with Existing Techniques

Table 3 shows the comparisons of several strategies, with parameters such as routing type, overhead, delay, scalability, and efficiency taken into account. The routing type indicates either the technique can be used for single-hop (SH) or multihop (MH). The overhead, sometimes known as overhead costs, is a recurring cost for the system. Scalability refers to ability to perform well as one or more of the network’s fundamental parameters rise in value. Delay defines the time required to pass message from source to base/sink.

So, from Table 3, it is clear that CUCKOO-ANN perform well compared to the other existing techniques. Proposed model has low delay and good scalability with efficiency of 98%.

The fitness functions in the proposed model are Root Mean Squared Error (RMSE) and Mean Magnitude of Relative Error (MMRE). The RMSE indicates the clustering of data sets around the best fitness function defining the objectives of the system. In similar manner, MMRE is used to estimate the error difference between the estimated data and actual data [39]. The RMSE identifies the large errors by giving them relatively high weights, while MMRE indicates the relative error in relation with correct value. Both help to find the errors in the system with respect to the correct value. In the literature, MMRE is the most extensively used performance metric for software cost estimation. The goal is to keep these numbers as low as possible. Equation (8) defines the RMSE function, and equation (9) defines the function MMRE. where is estimated time series and represents actual observations time series. Table 4 compares the RMSE and MMRE values for different techniques.

4.3. Performance Assessment of Proposed Model

To evaluate the performance of the proposed CUCKOO-ANN model, the confusion matrix is used. Table 5 indicates the parameters obtained from the confusion matrix. Table 6 shows the results obtained from the confusion matrix and compared with the technique stated in Table 3; it can be seen that the proposed model performance is high.

For high accuracy, the system must predict the true positive response and true negative response of the technique. Out of four parameters defined in Table 4, accuracy is considered as most important in case of WSN.

4.4. Discussion

From the simulation results, it can be concluded that the proposed CUCKOO-ANN technique is the most suitable for IoT-WSN in terms of energy efficiency. The CUCKOO optimization plays a vital role in selecting the best sensors for message transfer, and the ANN module helps the system obtain the best suitable path for message transfer from source to base sensors. By combing these two features, the overall cost of the system decreases, which directly indicates the superiority of the model with respect to other models discussed in the literature review. Although the technique is better than other existing technique but for large size network, the method needs more computation space and fast processor.

For future work, keeping security and efficiency as key points in the block chain can be a useful tool for future IoT-WSN routing and safety. The following are possible future goals for using block chain: (i)Improving network performance(ii)Minimizing the random deployment cost(iii)Enhancing the security of sensors

5. Conclusion

IoT-WSNs are commonly installed in dense clusters in certain fields to monitor required parameter values. Any wireless sensor network’s main goal is to extend the network’s overall lifetime as much as feasible. As a result, energy efficiency is a critical parameter for every sensor network, and any effective management must emphasize it. In this research paper, a novel CUCKOO-ANN based optimization technique is used to achieve a more efficient and reliable energy efficient solution. First, the CUCKOO method finds the suitable/possible nodes which can help for fast message transfer. Then, the ANN system finds out all the possible paths and then chooses the three best paths, those having the smallest number of nodes, and calculates the cost of the possible routes.

The simulation results show that the cost of the best route is 2.14. Route 3 consists of 10 nodes and is the most suitable for message transfer from source node to sink node. The RMSE and MMRE values are 0.035 and 0.14, which indicate the best results. In contrast to other strategies used in the literature, we discovered that the CUCKOO-ANN model outperformed the majority of them. As compared with other technique, CUCKOO-ANN have very good sensitivity with efficiency of 97% and accuracy of 98%. This makes it more suitable where a large network is required. Using data structure and analytics, the computation time and computation burden can be reduced in future. In the future, one can improve the proposed technique by considering various operators and computing complexity in order to make future work more feasible for the proposed technology.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there is no conflict of interest regarding the publication of this paper.