Keywords

1 Introductıon

Regarding energy economy and the smallest hop count in the routing protocol, the routing protocol in wireless sensor networks is crucial. The terminal node in a cognitive radio network, which may have any number of mobile nodes, often uses a battery to supply power and ensures it can communicate over extended distances. In cognitive radio networks, energy resources play a key part in this. One node in a network loses energy, which means that node cannot continue to participate in the data transmission process and is referred to as a dead node. Numerous issues, including data interruption faults in the link and excessive energy consumption, could be brought on by these dead nodes. We can create a forwarding link node that is positioned in the middle of the nodes to address this issue, but this would result in congestion at the data points and a bigger degree of transmission loss as a result of the link cluster head’s energy exhaustion. Additionally, it has been found that routing protocols that disregard the energy component use a lot of energy and are expensive.

These days, there is a lot of room for energy-saving methods, such as sensor networks with clusters and a hierarchical routing protocol to lengthen the lifetime of the network. It is noted that the energy state of the cluster heads and sensor nodes has not been taken into account in the LEACH protocol. To address this problem, various researchers have proposed various techniques, such as orthogonal frequency-division multiplexing (OFDM) type of sensors and optimal sleep–wake scheduling, but these have not had an impact and also have an issue with increased packet delay, because each of the sensor nodes has its own energy state.

In this work, we suggest an energy-efficient routing protocol for cognitive radio networks based on the comparative analysis conducted in this article. This protocol primarily focuses on enhancing network performance at various levels of energy stages, such as normal, warning, and dangerous stage. In the suggested study, we have concentrated on the node’s energy consumption and the network lifespan residual energy model. Additionally, we conducted a comparison of the proposed EERP with the LEACH protocol and found certain advantages including lower energy consumption, a longer network survival time, a decrease in packet loss rate and packet delay of data delivery, and protection of low-energy nodes.

2 Related Work

The network throughput would drastically decrease as a result of such uncooperative behavior. We suggest a credit-based Secure Incentive Protocol (SIP) to encourage collaboration across mobile nodes with different objectives in order to solve this issue (Zhang et al. 2007). In addition to introducing energy-efficient uneven clustering protocol to APTEEN, the strategy also integrates cross-layer design methodology with routing and spectrum allocation. Ant colony algorithm is used to complete inter-cluster path search, which reduces the workload of the cluster head (Wang and Wang 2019). NP-complete optimization issue with an EQS route is serving as a workable solution. We develop a new deep reinforcement learning model that supports the DRQR protocol to create EQS routes in real time through offline training as opposed to online training as most literature research does in order to address this issue (Tran et al. 2022).

In order to accomplish efficient routing protocol operation in terms of maximum energy conservation, maximum-possible routing pathway setups, and minimal delays, a signaling mechanism and an energy-efficient system were developed based on a simulation scenario (Mastorakis et al. 2014). In order to address bandwidth constraints and battery life issues in wireless sensor networks, cognitive radio technology is being studied (Srividhya and Shankar 2022). The energy utility function is optimized by customizing the sensing period, sensing threshold, and number of collaborating SUs at the same time with the restriction of offering adequate protection for the primary user (PU) (Wu et al. 2014). But without considering energy efficiency, low-energy adaptive clustering hierarchy (LEACH) has been included into CWSN. The fact that node energy is finite and cannot be increased is one of the shortcomings of CWSN. To increase energy efficiency and increase the lifespan of CWSN, an efficient routing (Ge et al. 2018) protocol is required. In the CWSN, it is crucial to minimize energy use during data transmission. Along with the research work, an enormous work as in Bolla and Shivashankar (2017), Jijesh et al. (2021), Shankar et al. (2020), Palle et al. (2020), Bolla and Shankar (2020), Ding et al. (2017), Wang et al. (2013), Shome et al. (2021), and Ibrahim et al. (2022) is helpful in carrying out the work.

3 System Model for Energy Consumption of CRNs

As per the LEACH protocol, a system model for consumption of the energy for sending the nodes is discussed in Fig. 2 as follows.

In Fig. 2, we assume that the distance from transmitting node to receiving node is given by a variable d and energy consumption for the amplifier is \(E_{{{\text{amp}}}}\). Energy to receive the signal is \(E_{{{\text{min}}}}\) and the relation between \(E_{{{\text{amp}}}}\) and \(E_{\min }\) is given in Eq. 1.

$$ E_{{{\text{amp}}}} \left( d \right) = kd^{n} E_{\min } , $$
(1)

where the value of n can be 2 or 4 and k is a constant. For instance, \(n = 2\) and \(k = 1\), then lifetime analyzed to lifetimes how outperforms lifetime down on 1 can be rewritten as in Eq. 2.

$$ E_{{{\text{amp}}}} \left( d \right) = d^{2} E_{\min } . $$
(2)

To calculate the energy transfer parameters and receiver parameters, we use \(E_{TX}\) and \(E_{RX} ,\) respectively, where ETR is the computational energy. And it is given by Eq. 3.

$$ E_{TR} = E_{TX} + E_{RX} . $$
(3)

For sending or receiving of \(L\) bits of data, then we use Eqs. 46.

$$ E_{TX} \left( {l,d} \right) = l \left( {E_{{{\text{elec}}}} } \right) + d^{2} E_{\min } , $$
(4)
$$ E_{RX} \,\left( {l = lE_{{{\text{elec}}}} } \right), $$
(5)
$$ E_{TR} = E_{TX} + E_{RX} = 2lE_{{{\text{elec}}}} + ld^{2} E_{\min } . $$
(6)

Further, residual energy (R) can be calculated based on the percentage of ratio given below as follows as in Eq. 7.

$$ R = \frac{{\text{current residual energy value}}}{{\text{initial energy value}}}. $$
(7)

4 Routing Protocol

In the proposed work, we have focused on the residual energy, and based on this, the routing strategy has been proposed. To understand clearly, for instance, a link is said to be free if its R (overall) residual energy is more than zero. If not, the link is not free. The routing path has been established on the residual energy (with greater ER). It is essential for distributing the network’s load. It is not assumed that the nodes will be sent if their leftover energy is in the danger stage. A prolonged survival time can be considered only for the source and destination nodes.

In this article, we have assumed two thresholds T1 and T2 are the node’s relative residual energy values are thought to be, and the energy within the node has been separated into three stages. Stage 1: Normal stage (TS1), Stage 2: warning stage (TS2), Stage 3: danger stage (TS3). T1 is smaller than T2. As per Eqs. 810, the proportion of remaining energy T is compared with T1 and T2.

$$ T_{s1} = {\text{normal}}\quad T_{2} < T < 1.0\quad E_{r} \;{\text{is high}}, $$
(8)
$$ T_{s2} = {\text{warning}}\quad T_{1} < T < T_{2} \quad E_{r} \;{\text{is middle}}, $$
(9)
$$ T_{s3} = {\text{danger}}\quad 0.0 < T < T_{1} \quad E_{r} \;{\text{is low}}. $$
(10)

According to the equations above, the node is safeguarded and is not transmitted when it is in a dangerous stage.

4.1 Route Request

Any node that needs to transfer data must first check the availability of the routing database to see if a valid route is present. It must first send a route request (RREQ) message to connect with the closest node. According to Fig. 1, the RREQ is made up of the source ID, sequence number, destination ID, residual energy message, and relative residual energy value.

Fig. 1
A rectangular block has 5 cells that include S I D, D I D, sequence number, R message, and R relative from left to right.

Route request RREQ message format

Fig. 2
A line graph of energy consumption in millijoules versus sequence number in seconds plots 2 decreasing lines for LEACH and E E R P starting at (2, 800) and (2, 65), respectively. Values are estimated.

Energy consumption versus sequence number

When the RREQ message is received by the intermediate nodes which are the neighboring nodes from the source node, then the protocol has to first verify the corresponding route concerning the routing table, and as per the requirements, the effective routing table is updated to overcome the loop generation sequence (14, 15, and 16). The process of continuous forwarding of the RREQ is continued until the route to the destination node appears. The node that is being forwarded will obtain the information of the energy from the RREQ message format. With the acquired information, it compares it with its energy information, and then it decides and checks whether the information in the routing table needs to be updated or not. The relationship between the old and new energy levels is as follows, and the \(E\,\left( {{\text{new}}} \right) \) is as in Eq. 11.

$$ \begin{aligned} & \quad \quad {\mathbf{If}}\;E\left( i \right) < E\left( {{\text{old}}} \right) \\ & \quad \quad {\mathbf{Then}} \\ & E\left( {{\text{new}}} \right) = E\left( i \right) \\ & \quad \quad {\mathbf{Else}} \\ & E\left( {{\text{new}}} \right) = E\left( {{\text{old}}} \right) \\ \end{aligned}. $$

The new energy E(new) is

$$ E\left( {{\text{new}}} \right) = E\left( {{\text{old}}} \right)\mathop \sum \limits_{i = 0}^{N} E\left( i \right). $$
(11)

4.2 Route Discovery

The route discovery process is complete once the RREQ can be delivered to the source node. If the intermediate node has the destination node, the RREQ message is forwarded to the source, for example. The destination node will check the energy level information (E) with the threshold residual energy, say \(T_{1}\) and \(T_{2}\), after receiving the RREQ. The method of establishing the current link and completing the routing is based on these thresholds, and after a little wait, the RREQ source node receives a message indicating that the route discovery procedure is finished.

4.3 Route Establishment and Route Maintenance

In the proposed work, when the residual energy of a node is exhausted, then the node needs to find out the next-hop possible route sensing node. This involves the following two phases.

  • Phase 1: To select the neighboring sensing node, the node with the comparatively largest residual energy is used.

  • Phase 2: To pick up the neighboring sensing node for the next hop to transmit the data, we need to compare the neighbor sensing node residual energy with the predefined threshold value (E).

  • Phase 3: If the energy of the chosen neighboring sensing node is below the predefined threshold, we will reduce the predetermined threshold (E) and reselect the next-hop node.

Based on the three steps, the routing between the source node and destination node can be determined, previously described by taking into account the residual energy levels. But in order to maintain the route, the following route maintenance technique is used.

Once the route from source to destination has been established, the path is referred to as an active path. In the event that the source node has changed locations during data transmission, the route discovery process needs to be restarted. A route error (RERR) message is provided to the source node if the destination node or any intermediary nodes move.

There are two categories of route maintenance in this situation. During the source route rediscovery procedure, the source node must first broadcast the RREQ message to its neighbors along with the destination node sequence number, residual energy, and relative residual energy. In order to repair the damaged link by using another intermediate node, attention must be given with the upkeep of the intermediate nodes. In order to reestablish the path to the destination node, the corresponding intermediate nodes broadcast the RREQ message to their nearby nodes. When the path between the source node and the destination node is re-established, this operation can be finished.

5 Performance Analysis

Researchers have been able to assess the suggested routing protocol’s performance in terms of typical energy usage, packet loss rate, and network longevity by contrasting it with the LEACH protocol. The comparative analysis of the above-mentioned metrics for the existing and the proposed works is presented as follows in Fig. 2.

5.1 Packet Loss Rate

This metric is helpful for tracking the effectiveness of cognitive radio networks. As per the results obtained, we observed that the packet loss rate of sensing the node is rising. This is due to the reason that the death date in the network nodes has been increased. The proposed work has a smaller packet loss rate because of the energy consumption optimization mechanism using residual energy concept, and further due to the maintenance of the lifetime analyzed to lifetime show out performs lifetime drop-down quality lifetime analyzed to lifetimes how outperforms lifetime of communication in the network as in Fig. 3.

Fig. 3
A line graph of loss rate in percentage versus time in seconds plots 2 increasing lines for LEACH and E E R P ending at (100, 58) and (100, 45), respectively. They start at (10, 0). Values are estimated.

Loss rate versus time

5.2 Network Lifetime

This is often determined by how long the network’s sensing nodes survive. From the results obtained in Fig. 4 it is observed that as the network working hours increases with time.

Fig. 4
A line graph of the number of live nodes in millijoules versus time in seconds plots 2 decreasing lines for LEACH and E E R P ending at (100, 5) and (100, 20), respectively. They start at (10, 100). Values are estimated.

Number of live nodes versus time

The survival rate of network nodes has decreased, but the proposed protocol has a better number of live nodes than the existing protocol.

6 Conclusion

The research work proposed in the article is mainly focused on improvising the network lifetime in CRNs. As per the study carried out, in order to assess the proposed work, we assessed the two energy consumption optimization routing protocols, taking into account the network lifetime, node energy consumption, and packet loss rate. We found that the LEACH protocol performs better for CRNs. Overall, the outcomes show that the suggested approach performs better than the existing methodology. The energy consumption appears to have a rather positive impact on the network lifetime and consumption of energy is drop-down by about 5%, the live nodes concerned has been improved by about 13%, and the loss rate has been reduced by about 6%.