## 5 Intelligent Opportunistic Protocol (IOP)
As the proposed OR protocol is efficient in energy consumption, the sensor nodes are able to survive and communicate for a long time in the network. As long as the communication goes on, the base station would continue to receive the packets. ### Network Lifetime

Network lifetime for wireless sensor networks is dependent upon the energy consumption in the network. When the energy of the network is 100 percent, the network lifetime would also be 100 percent. However, as the nodes start operating in the network, the network lifespan would start to reduce

Figure 6: End-to-end delay. Figure 7: Packet to Base Station per Second. Figure 8 represents the percentage of lifetime remaining after each round of simulation. Proposed OR protocol has a good network lifetime due to the lower energy consumption in the network. ### Packet Loss

The packet loss is referred to as the number of packets that are not received at the destination. To calculate the number of packets lost during each round of the simulation, packet sequence numbers are used. Whenever a source tries to send packets to a destination, it inserts a sequence number. Later, on packet reception, these packet sequence numbers are checked for continuity. If a certain sequence number is missing then it is referred to as packet loss. Packet loss recorded per round of simulation and presented in Figure 9. It can be depicted from the figure that packet loss for the proposed protocol is less, as compared to EEOR and MDOR. This is because the forwarder node selection algorithm runs on each relay and source node. This algorithm calculates the probability of successful transmission through a neighbor node. This also increases the reliability of the protocol and provides accurate transmissions. ### Discussions

A significant improvement could be seen in the graphs after the simulation is complete. Figure 5 shows the total energy consumption after each round of packet transmission is complete. Here, the round was termed as packet transmissions in between single source and destination. MDOR showed the highest energy consumption, followed by EEOR and the proposed protocol. This was because MDOR wasted more energy in the initial setup. However, the dynamic energy consumption

Figure 8: Network lifetime. Figure 9: Packet loss during simulation. considerations led the network to survive for a long time, as shown in Figure 8. In the case of EEOR in Figure 5, it consumed lesser energy in transmission and the initial setup for opportunistic selection of relay nodes was based on the power level. However, when it comes to lifetime, EEOR failed to perform better, as it considered the network to be dead when any one of the nodes ran out of its energy. EEOR chose one node as a source and continued transmissions opportunistically, which resulted in a significant reduction in the power level of a single node. The proposed protocol gave the best results, as in each round, the source node was based on the intelligent model to change the next-hop relay node. Figure 6 presents the average end-to-end delay per round, generated by the simulation, and the proposed protocol worked significantly better as the next-hop selection was based on an intelligent algorithm. The proposed algorithm helped to significantly reduce average end-to-end delays. Figures 7 and 9 showed the reliability and availability performances of all protocols, including the proposed protocol that showed significantly better performance. This meant that the proposed protocol was a new generation protocol that has potential in many applications of WSN. ## 7 Proposed Framework

In recent years, WSN saw its applications growing exponentially with the integration of IoT. This gave a new purpose to the overall utility of data acquisition and transmission. With the integration of WSN with IoT, the IoT is making a big impact in diverse areas of life, i.e., e-healthcare, smart farming, traffic monitoring and regulation, weather forecast, automobiles, smart city, etc.