1 Introduction

WSN stands as a collection of sensor nodes where every sensor node comprises of sensing unit, processing unit and also control unit. Senor node is dreadfully resource constraints (restricted battery power, constrained memory etc.). A sensor network has been classified as centralized sensor network and also distributed sensor network [1,2,3]. Distributed sensor networks are exceedingly pertinent when contrasting with centralized sensor network on the grounds that if the focal node central node gets fails, then the complete network will get fallen. As per literature analysis, the deployment is an exceptionally central region to satisfy all the essential needs among the research areas in WSN.

In WSN, the routing protocols are characterized in light of initiator of correspondence, way foundation, arrange structure, convention operation, and next jump determination. Various leveled, directing and area centered directing.

The deployment has been basically categorized as random deployment as well as deterministic deployment [4]. Random deployment is particularly utilized to gather the data from the antagonistic condition where the sensor nodes are tossed from helicopters or something different. Be that as it may, the deterministic deployment [5, 6] is exceptionally relevant for referred to the known area and additionally effectively available territory which means the limit of the zone has been computed effortlessly. It is the inspiration to gather all the information detected by sensor nodes by sink or else base station. In line with the researcher’s concern, the neighbor node ought to be deployed within the communication range (RC) of a particular node. On the off chance that the sink node doesn’t set inside the communication range of source node, at that point, the route discovery method will be started towards finding the sink node from source. At the point when a node communicates with the neighbor node, the accessible battery energy is playing a vital part which implies if the battery energy lessens underneath certain level; the transmission can’t reach the neighbor node which is regarded as the node failure.

Every sensor module can screen the numerous physical parameters inside the sensing range and transmit the information up to its communication range [3, 7, 8]. The sensing and also communication range could be restricted. So, large number sensor nodes require covering the complete region of the field grounded on the region selection. Here, the static deployment is predominantly concern about the enhanced sensor node deployment for deterministic range and the area of every node ought to be known regarding the geometry of the field without Global positioning system (GPS) [9, 10]. And the distance betwixt every sensor node and sink node has been effortlessly recognized by nodes utilizing the coordinates.

Communications betwixt sensor nodes are a critical problem on the wireless sensor which should be possible with a single hop and multiple hops [4]. To the extent research concern, entire sensor nodes are required to direct their grouped data to sink node where every sensor node can communicate just with neighbor nodes within the communication range which implies it can surge the data to all the neighbor nodes within the communication range. Be that as it may if the sink node doesn’t set inside the communication range of source node, at that point the source node should locate a reasonable course towards sink node. The researchers primarily centered on hierarchical routing and also flat routing (data centric) that should be possible by the flooding of data through every one of the neighbors of source node [11]. It doesn’t worry about the direction of sink location and searching the position of the sink is an extremely troublesome errand in routing. Be that as it may, in Q-(NS)2 routing protocol, the source node to sink node information delivery is exceptionally directional which corrects the pointless wastage of power because of information flooding [12] to its whole neighbor and a viable routing has been established betwixt source to sink node.

The node failure is another vital crucial issue in deterministic area deployment. Because of unbalanced energy utilization of sensor node, the battery life is getting lessened which implies effortlessly exhausted [13]. In the event that any of the nodes get fail, a coverage hole is made on the field. So another defective node replacement strategy required to reestablish the connectivity and rectify the coverage hole issue. The analysis was done where to put the alternate node (NA), how to discover the node failure and also how to supplant in the correct area. The mobility is additionally has been added to an alternate node and also two correspondence modules are joined on the node. At first, Alternate node works utilizing high communication range module for checking the neighborhood node failure. If it finds any node failure within the communication range, then the defective node replaced by the alternate node and gets activated another communication range module which is equal to normal node communication range furthermore it will go about as a common node. Here, it has been depicting that the performance comparison has been done between Quadrant based Direct routing protocol (Q-DIR), Angle routing protocol (ARP) and Q-(NS)2 routing protocol. Therefore, Q-(NS)2 routing protocol decreases the pointless flooding of ‘RREQ’ to the greater part of its neighbor which implies it devours less energy for data packet delivery and no redundant node in NA deployment II. Related work. III. Problem statement IV. Static and deterministic common nodes deployment. V. Proposed Q-(NS)2 routing VI. Proposed deterministic placement of alternate node. VII. Performance Evaluation.

2 Related Work

Some research endeavors was learned about the deployment, alternate nodes for defective node replacement and routing techniques for static nodes in wireless sensor network. The reference paper [1, 4, 9, 14, 15] portrayed the related study about a static node deployment, paper [13, 16, 17] depicted the related study about alternate node placement among the common node and replacement strategy for defective node and paper [18,19,20] explained regarding quadrant based directional routing protocols.

Yu-Chee Tseng et al. [9] derived the necessary conditions of static node deployment together with finding the coordinate of neighbor nodes. The neighbor node coordinate was found concerning origin. Nevertheless, the origin node may not be constant every time which implied origin node getting changed in light of the data transmission. Like this sort of coordinate discovering technique won’t be reasonable for additionally routing process. Simultaneously, if any of the nodes get failed in that coverage area, the coverage hole was made. This paper gave a better outcome but unfortunately the accuracy of the deployment was less.

Wang and Tseng [1] determined the fundamental conditions for mobile node deployment with a different position in light of distance. Here, each time the node was getting moved arbitrarily to enhance availability. To the extent the researcher’s concern, the mobility of node took much energy when contrasted with static node. For routing procedure, it required different vector table and in addition, it wanted to inspect the location of a specific node. It is tough to discover the coordinates of each node when it is mobile.

Zhang and Shi [14] Grid-based energy efficient routing has been analyzed. Here, the energy estimation was finished with some mathematical calculation. In any case, the extent that research concern, the grid-based node deployment in light of this paper couldn’t cover the whole area which implies that it make expansive coverage hole in the sensing region. Like this, the coverage problem was a noteworthy issue. Several energy-efficient routing algorithms were designed so that the result could be applicable to other fixed topologies was the advantage. The variation on the network lifetime for the fixed base and rotated base was more which was the cons of this paper.

Toumpis and Tassiulas [4] inferred the equations and techniques for the shortest path betwixt multiple sources and multiple sinks. As per this research, multiple sinks use can take unnecessary energy utilization on wireless sensor network here, clarified the OSI layer-wise representation for data transmission between multiple sources to multiple sinks. Multiple sink system was practically identical to cluster head formation. The pro of this paper was that it provided infinite number nodes. If anyone of the physical layer was damaged the whole network deployments were loosed was the biggest drawbacks.

Zhang et al. [15] proposed three deployment techniques, specifically, connectivity-oriented deployment, lifetime-oriented deployment, and also hybrid deployment (adjusting the concerns of connectivity necessities and lifetime augmentation). Furthermore, derived numerous energy utilization equations grounded on the battery power. To enhance the connectivity of the network, relay node has been put to getting single hop communication [5]. According to research due to relay node deployment presumed that there in ‘K’ coverage.

Izadi et al. [11] derived the fundamental conditions for deployment of the alternate node for supplanting defective node. Here, the mobile nodes were arbitrarily conveyed. Because of that random deployment, the coverage hole additionally coverage redundancy was made. To amend that issue another effective fluffy optimization algorithm was introduced. A self-healing algorithm in light of type-2 fuzzy logic frameworks to keep up the coverage rate of the wireless sensor network was proposed. It will be very reasonable for a network which contained more number of redundant nodes and in addition, it will bolster generally for arbitrary deployment technique. Nevertheless, it might not bolster for deterministic deployment and in addition deterministic territory ‘k’ coverage on the grounds that the deterministic area coverage has a geometric deployment of the sensor network and also geometric routing. For arbitrary deployment technique has more complication for finding the coordinate points of every last node however it is profoundly alluring for simple deployment of the new alternate node and which could be supplanted the defective node. The pros of this paper were that the WSN coverage issue was solved. But, only for random deployment model, wireless sensor coverage problem was developed.

Boudries et al. [13] analyzed the random node deployment based redundant node utilized replacement procedures. Here the significant number of redundant nodes is put arbitrarily and such nodes are in sleep mode normally. On the off chance that a sensor node failed (as a result of the absence of energy on the level of its battery for instance), at that point, one amongst its neighbor nodes moved to supplant it. According to implementation, it demonstrated that the superfluously set multiple nodes inside the coverage area for a long-term until any of the nodes was failed. Like this, it presented expenditure of cash and wastage of time and additionally it can’t be that much bolstered to well sort out deterministic coverage area. For receiving ‘K’ coverage it used the least number of nodes to get maximum coverage of the field. In this perspective, there was no redundant node to supplant the failure. Thus, another alternate node deployment method was required to get supplant the failure node.

Tong et al. [16] elucidated the details about mobile repairman (MR) technique for defective node substitution. Here, the framework comprised of a mobile repairman (MR), an energy station (ES), and a WSN make a group out of sensors encompassing the posts. The MR navigated the network occasionally to recover sensors having low or no energy and supplanted them with completely charged sensors. The MR visited every post at the most once every round. In each round j, when the MR visited a group, it recovered/replaced sensors, gathered data about the residual energy of the group, and notified its meeting time and the number of sensors to be recovered/supplanted at round j + 1. After the MR visited all groups, toward the finish of round j, the MR has the residual energy of the all the groups. It is a time-based framework, which implied as according to the time interim the MR visited and supplanted the failed sensor. But till that MR arrival time period, the failed node area can’t be reestablished. This was a more basic issue in this research. Here, sensors receive information and updated their record but the sensor broadcast update record was not given clearly.

Kum et al. [17] clarified the details about gate way and hop-count discovery and route discovery. Here, the gate way was occasionally communicated its identity & presence of nodes in the region. AODV–DF installed the gateway’s address (IP) and also hop-count data to hello message (e.g. “ Hello message + IP of gate way (sink) + hop-count “). At that point, the Hello packets emanated outward from the gateway and every node keeps up its hop-count information. Thus, the neighbor of the sink node updated the hop count as 1 (sink node − hop count at first ‘0’) and each node know their hop-count and IP of the sink. Subsequently, the route discovery was introduced where Hop-count indicated the expected hops to achieve sink. According to flooding information, source node communicated Route Request (RREQ) with hop-count value towards neighbors. Subsequent to receiving the ‘RREQ’ message with hop-count by neighbor node from source node, the neighbor node chose that: “If hop-count value of neighbor was equivalent to source node hop-count at that point neighbor node disposed the ‘RREQ’, generally the neighbor node Replace the hop-count value of its own and rebroadcast ‘RREQ’”. If it doesn’t know the hop-count, at that point communicated the ‘RREQ’ to its whole neighbor like ordinary flooding. In the end, the ‘RREQ’ achieved the gateway and the gateway sent back an ‘RREP’ utilizing unicast to transfer the path. At last, the source node setup a route grounded on the reception of ‘RREP’ message. The pros of this paper were that it clearly defined about the gate way and hop-count discovery and route discovery. The cons of this paper were that they compared their work only with a few related approaches.

Latiff et al. [18] clarified concerning Q-DIR where ‘RREQ’ packet contained the location details of source and also destination. At first, such ‘RREQ’ packet basically overflowed to its whole neighbor. After the reception of ‘RREQ’ packet, the neighbors simply calculated the quadrant where the sink node is placed from its own. Simultaneously, Source node additionally calculated the quadrant where the sink node was set from the source. A straightforward comparison was done for suitable neighbor node selection among all neighbors which is nothing but, if the quadrant of destination contrasted with source and quadrant of me contrasted with the source are same, at that point that neighbor nodes are chosen for additionally flooding. This procedure persistent till it achieved the destination node. It can lessen the undesirable flooding to neighbors which were placed toward all path of the source node. The advantage of this paper was that it reduced the undesirable flooding from all path of the source node. The drawback was that they only considered static networks and intended to simulate in mobile environment.

Akyildiz et al. [20] clarified about angle routing protocol where every node recognizes its own coordinate. In this research, it was analyzed and legitimized that, how to make another network, how to include data’s about new node entry inside the communication region and movement handling of sensor nodes. Here, another route discovery technique has been presented where the route between sources to sink developed based on an angle (offline). It implies that, at first, line plot between source to sink and mirror angle (Q) created up and down regarding straight line. Presently one of the reasonable neighbors was chosen in light of shortest distance in both areas up and down which implied absolutely two appropriate nodes has been chosen for advanced transmission. This ARP routing protocol decreases the number of nodes which are utilized for RREQ flooding. Thus, it devoured less energy and also took less number of nodes to attain the destination.

3 Problem Statement

Under two distinct conditions (RC ≥ 3RsRC < 3Rs), the deployment of WSN node has been assemble [9]. In line with the researcher analysis, Each and every node should know its own particular ID and in addition neighbor nodes ID. For distinguishing neighbor node ID’s, every node goes about as an origin and grounded on that origin task the neighbor node ID’s are found regarding origin. As per this research dissects the coordinates of neighbor nodes are totally relies upon only the origin node which implies, it isn’t identified as the worldwide coordinate of every node. For additionally routing between sensors nodes are abundantly convoluted for finding the neighbor node to transmit the information towards sink node. In light of this [1] research analysis, the mobile node takes more energy than static node and in addition, it requires complex geometry to locate its own particular coordinate and neighbor node coordinates. In this [14] research analysis, the grid-based node deployment procedure makes coverage hole among the coverage region. Because of this [4] research analysis, the multiple sink placement devours more energy and it will make cluster structure in wireless sensor network where cluster head goes about as a sink node.

In this research [13], another effective fuzzy optimization algorithm was introduced for lessening the coverage hole and coverage redundancy in mobile deployment. Owing to random deployment methodology of the mobile node, it has more inconvenience for finding the coordinate points of every last node and it contains more number of redundant nodes. As indicated by this [16] research analysis, a substantial number of redundant nodes are put among the common nodes which are in the sleeping mode where pointlessly stacked more number of nodes inside the coverage area for a long duration. Each redundant node wasting a vast amount of battery energy till it gets activated. Here [17] the mobile repairman (MR) visits intermittently (time interim) among the sensor network to locate the defective node. It demonstrates that some basic time delay for supplanting the failure node since it needs to hold up till next round of mobile repairman visits.

As indicated by this [18] research analysis, the gate way intermittently communicates its identity and presence of nodes in the region where the hop-count has been utilized to recognize the appropriate route. Be that as it may, intermittent information broadcast of gate way expends more energy and adjacent node of sink node will be dead soon. RREQ (route request) is broadcast. RREQ reverse path is made along the way. RREQ message holds < bcast_id, dest_ip, dest_seqno, src_ip, src_seqno, hop_count > . Here [12, 19] the RREQ packet is just overwhelmed towards its whole neighbor every way. Afterwards, the distance based reasonable neighbor selection has been performed for the situation additionally route discovery. Such type of route discovery isn’t more directives from beginning stage onwards and superfluous flooding of RREQ information to all directions which expends more energy. Thus it wants more directive Route recovery algorithm. In view of this [20] research analysis, angle routing protocol demonstrates that the selection of angle in top and bottom regarding line drawn between sources to sink gives more mandate route recovery. In any case, the superfluous angle selection of top as well as bottom additionally makes fairly more extensive region selection to locate the appropriate neighbor for additionally routing discovering which implies in top angle one neighbor is chosen and also in top region another neighbor chose.

4 Common Node Deployment

Device deployment stands as a central issue in WSN design. It is expected the coverage region is square (M × M), sensing range ‘RS’ and the antenna has the communication range ‘RC’. According to Ref. [9], it should be perceived that the neighbor node must be deployed at the distance of \( \left( {\sqrt 3 } \right)*Rs \). The researcher has been analyzed the deployment of sensor node with the use of different geometry. Among the geometry \( Rs < Rc \le \left( {\sqrt 3 } \right)\,*Rs \) coverage strategy requires more number of sensors nodes to the cover whole region since it requires much sensor nodes in between neighbor node aimed at getting connectivity. Yet, \( Rc > \left( {\sqrt 3 } \right)*Rs \) coverage strategy requires less number of the sensor to cover the whole region since it doesn’t require many sensor in between neighbor for getting connectivity.

In Fig. 1 the geometry of neighbor node placement has been indicated which demonstrates that the direct communication with neighbor node is pertinent with no extra sensor node for getting connectivity. What’s more, it requires the coordinate of every node for further geometric routing.

Fig. 1
figure 1

RC > (√3) * RS geometry for deployment

In view of the geometry of the sensor node deployment [9], each neighbor node is deployed with the distance of ‘(√3) * RS’. As per the assumption, the coverage region could be square (M × M) and also the deployment of the node has been begun from the top most left corner. First node considered as reference node which is placed in ‘x’ axis with the distance ‘(√3) * RS’ as of the origin and the ‘y’ axis placed at the distance ‘(√3) * Rs’ from the maximum. Thus, the reference point could be \( (0 + \left( {\sqrt 3 } \right)*Rs,M - \left( {\left( {\sqrt 3 } \right)*Rs} \right) \) presently, the neighbor nodes have been set persistently (forward direction) in a similar row with the distance of (√3) * RS till it fulfills the condition ≤ XM).

On the off chance that the condition is getting surpassed, at that point, the node placement shifted into the adjacent row which implies node placement shifted one stage into ‘y’ axis with the axis with the distance ‘(3RS)/2’ till it fulfills the condition ≥ Y0. Alongside the shifting of ‘y’ axis, one stage ‘x’ axis movement (reverse direction) with the distance \( \left( {\left( {\sqrt 3 } \right)/2} \right)*Rs \) has been comprised for adjacent row first node placement. After the first node placement of adjacent row, the neighbor nodes has been set persistently (reverse direction) in a similar row with the distance of \( \left( {\left( {\sqrt 3 } \right)*Rs} \right) \) (till it satiates the condition ≥ X0). In the event that the condition is getting surpassed, at that point the node placement shifted into the adjacent row which implies node placement shifted another step into ‘y’ axis with the distance ‘3RS/2’ till it fulfills the condition ≥ Y0. Along with the shifting of ‘y’ axis, one step ‘x’ axis movement (forward direction) with the distance \( \left( {\left( {\sqrt 3 } \right)/2} \right)*Rs \) has been added for adjacent row first node placement. Later the first node placement of adjacent row, the neighbor nodes has been set consistently (forward direction) in the same row with the distance of \( \left( {\sqrt 3 } \right)*Rs \) (till it satisfies the condition ≥ XM). The point 1 and 2 repeated (till it satisfies the condition ≥ Y0). On the off chance that the condition reaches the level < Y0, at that point the deployment of sensor node inside the coverage region is finished and it stops further node deployment (Table 1).

Table 1 Coordinate of each sensor node for region (M × M)

In Fig. 2 the static node deployment has been given for the square region ‘M × M’ where ID of the sensor nodes in addition has been said.

Fig. 2
figure 2

Node placement according to square region (M × M)

Coordinate of Common Node

The communication betwixt every node relies upon the information exchange amongst the nodes and assembled by sink node for additional processing. So, source to sink or else base station communication has been done with proper routing. Every node must be known of its own coordinate point as an ID. In this research analysis, it has been accepted that the coverage region is square ‘M × M’, ‘α’ is \( (\sqrt {(3)*Rs} ) \) and ‘β’ is \( \left( {\sqrt {(3)} /2} \right) \) (Fig. 3).

Fig. 3
figure 3

Representation for Q-(NS)2

5 PROPOSED Q-(NS)2 Routing

Initially, the source node is assumed to be an origin while finding the route towards the sink. But it encompasses its own coordinate grounded upon the deployment. The primary motivation for this route discovery is to discover the quadrant where the sink node is put from the origin (source node). The slope between source to destination is discovered and drawn a line betwixt source to sink (Eqs. 1, 2). In accordance with this slope and line the quadrant (sink node) has been concluded (Fig. 4a). Subsequent to finding the quadrant of sink node, the source node floods ‘RREQ’ message to whole neighbors which are set inside the specific quadrant (Fig. 4b). So, the ‘RREQ’ message flooding to other neighbors who are placed in other quadrants has been rectified. Subsequent to the reception of ‘RREQ’ message, the neighbor node computes the distance (Table 2) headed for the sink node (Eq. 3) and updates the value in distance vector table and retransmits to source node (Fig. 5a). Presently the source node contrast the distance (neighbor to sink) of all neighbors and chooses appropriate node (bigger bold number in Table 2) which has less distance. On the off chance that at best two neighbor’s distance is same (Table 2), at that point calculates the distance towards source node (Eq. 3) and also update the distant vector table and retransmit to source node (Table 3). The source node compares distance (neighbor to source) of all neighbors and chooses the appropriate node which has less distance (bigger bold number in Table 3). Next, the selected node goes about as an origin and discovers the quadrant towards sink node from the origin (selected node). Again selection process repeated up until the point that it achieves the sink node (Fig. 4c). When it achieves sink node, the sink node sends the ‘RREP’ message back towards source node and the route was found (Fig. 4d), stream outline.

Fig. 4
figure 4

Route finding based on quadrant a Quadrant finding from source to sink placement. b Flooding of RREQ for selected neighbors. c RREQ formation towards sink from source d RREP formation towards source from sink

Table 2 N–SI distant vector table
Fig. 5
figure 5

(NS)2 neighbor selection by shortest distance a Neighbor to sink (NS) distance based neighbor selection. b Neighbor to source (NS) distance based neighbor selection

Table 3 N–N–SR distant vector table

Equation for line betwixt two points:

$$ y - y1 = u(x - x1) $$
(1)

Slope of the line (U):

$$ U = (y - y1)/(x - x1) $$
(2)

Distance betwixt two points:

$$ d = \sqrt {\{ x2 - x1)^{2} + (y - y1)^{2} } $$
(3)

Algorithm for Q − (NS)2

It has been assumed that SSR = (xSRYSR)SSi = (xSiYSi) & n = 1, 2, 3, 4…

figure a

6 Proposed Deterministic Deployment of Alternate Node

In the event that any of the common nodes gets fail, a coverage hole is getting made on the field. Here fundamentally centered on the substitution of the defective node by utilizing alternate node which is put at geometrically indicated zone among the coverage area. As per the researcher’s concern, it is presumed that the alternate node communication range could be 4 * RS when it goes about as an alternate node. Be that as it may, once on the off chance that it discovers the defect in any of its neighbor it will supplant and go about as a common node. According to the proposed static common node placement methodology and presumptions, the whole region has been segregated and put one alternate node in the middle of “250 × 250” unit area. And such alternate node can cover around eight common nodes by utilizing its high communication range 4 * RS. So that, the alternate node can communicate all of its eight neighbor nodes (common nodes) and monitor whether they are alive.

In Fig. 6 the region (500 × 500) possessed with 33 sensors as indicated by the proposed deployment methodology. Just then according to the given communication range of the alternate node, it can cover around eight common nodes inside its coverage range (4 * RS). So, the whole region is similarly split into four separate areas. Presently every region has just about 8 common nodes. So, one alternate node is adequate to cover whole sub-region. The alternate node was set at the center segment of the sub-region to get maximum coverage of whole sub-region. In light of the square region specified in the table, the aggregate number of nodes of the complete region is getting expanded along with the required alternate node is likewise getting expanded.

Fig. 6
figure 6

Alternate node deployment

6.1 Node Failure Detection

The status of the faulty node in WSNs can be riven into two sorts they are permanent and static. Permanent means failed nodes will stay flawed until the point when they are supplanted and static means new faults will not generate amid fault detection. WSN node faults are typical because of the accompanying induces: the failure of modules, (for example, communication and also sensing module) because of fabrication process issues, environmental factors, adversary attacks et cetera; battery power depletion; being out of the communication range of the whole network. The alternate node is checking every common node Fig. 5 which is put inside the coverage range. Each time the common nodes which are set inside the coverage range of alternate node send “hello “ message to hint its condition of alive and updates the neighborhood table of the alternate node by employing the information got from neighbors at time interim. If the alternate node doesn’t receive ‘hello’ message from any neighbor node immediately it sends the request message to that particular node. And if it did not gets further affirmation from that node, the alternate node chooses that the specific node gets failed Fig. 7. So, instantly the alternate node moves on the way to the failed node position and goes about as a common node at that specific location Fig. 7. The alternate node contains 2 separate communication module with two distinctive communication ranges. At first, the alternate node has communication range RC = 4 * RS before finding any of the defects from any of the neighboring nodes. In the event that it finds any defect from any of the nodes among the neighbors, the alternate node will move to supplant such alternate neighbor and promptly change its communication range to RC = (√3) *RS.

Fig. 7
figure 7

Defective node Identification

Here, “2.5 × 2.5 = 250 ×   250 & 5 × 5 = 500 × 500”

Coordinates of Alternate Nodes

It has been assumed that, the value of ‘K’ is 2, CD is a common divisor to discover coordinate for alternate nodes in view of region ‘R × R’

$$ CD_{L} = L*K $$
(6)

Here, L = 1, 2, 3, 4 ……. for (ex.) the region 250 × 250 selection CDL could be 1 × 2, region 500 × 500 selection CDL could be 2 × 2, region [750, 750] selection CDL could be 3 × 2, region 1000015 [13] × 1000 selection CDL could be 4 × 2 etc.

The node coordinates ‘NC’ for Alternate node ‘x’ axis is:

$$ NC_{Axn} = (CM_{p} *R)/CD_{L} $$
(7)

Node coordinates ‘NC’ for Alternate node ‘y’ axis is:

$$ NC_{Axn} = \left( {CM_{q} * R} \right)/CD_{L} ) $$
(8)

Here, ‘CM’ characterizes common multiplier for each coordinated in light of region selection, ‘l’ = 1, 2, 3, 4 ….., ‘p’ = 1, 3, 5, 7, …… < R.

According to the segregation of whole coverage region, each [250 × 250] segregation contains one alternate node at the center point which implies the alternate node has been put at the coordinate (250/2), (250/2). For instance, If selecting the region as square and the value is [500 × 500], at that point the position of alternate node could be [125, 375], [375, 375], [125, 125], [375, 125]. The coordinate selection was from top most left in light of the fact that the node deployment additionally begins from top most left.

Ex: 1. As per coordinate formula 5 & 6, size of the region [250 × 250], Common deviser (CD) is 2 and ‘q’ = R − 1, R − 2, R − 3, ……5, 4, 3, 2,1 > 0 (Fig. 8a):

Fig. 8
figure 8

Alternate node placement strategy a Alternate node (mobile node) placement for 250 × 250 region, b Alternate node (mobile node) placement for 500 × 500 region

Coordinate:

$$ NC_{AX1} = (CM_{p1} *R)/CD_{1} = (1*500)/4 = 125\quad NC_{Ay1} = \left( {CM_{q1} * R} \right)/CD_{1} = \left( {1* 500} \right)/4 = 125 $$

Ex. 2: As per coordinate formula 5 & 6, size of the region [500 × 500], Common deviser (CD) is 4, and ‘q’ = R-2, R-4, R-6, ……..6, 4, 2 > 0 (Fig. 8b):

Coordinate number 1:

$$ NC_{AX1} = (CM_{p1} *R)/CD_{2} = (1*500)/4 = 125\quad NC_{Ay1} = \left( {CM_{q1} * R} \right)/CD_{2} = \left( {3 * 500} \right)/4 = 375 $$

Coordinate number 2:

$$ NC_{AX2} = (CM_{p2} *R)/CD_{2} = (3*500)/4 = 375\quad NC_{Ay1} = \left( {CM_{q1} * R} \right)/CD_{1} = \left( {3 * 500} \right)/4 = 375 $$

Coordinate number 3:

$$ NC_{AX1} = (CM_{p1} *R)/CD_{2} = (1*500)/4 = 125\quad NC_{AX2} = \left( {CM_{p2} * R} \right)/CD_{2} = \left( {3 * 500} \right)/4 = 375 $$

Coordinate number 4:

$$ NC_{Ay2} = (CM_{q2} *R)/CD_{2} = (1*500)/4 = 125\quad NC_{Ay2} = \left( {CM_{q2} * R} \right)/CD_{2} = \left( {1 * 500} \right)/4 = 125 $$

On the off chance that the alternate node has discovered the defective node among the neighbor nodes, at that point the alternate node gets mobility towards the defective node. According to this common node and alternate node deployment analysis, the coordinates of both common and alternate node could be effectively found. At that point, the movement of the mobile node can be resolved by distance (D) between the defective node and alternate node and also angle (θ) betwixt the defective node and alternate node. The required speed betwixt the alternate node and defective node (common node) is:

$$ Velocity = distance/time $$
(9)

For finding the angle (θ) between the alternate node and defective node could be computed by the slope of the line between two nodes (Eq. 1).

So, the angle betwixt mobile node (alternate node) and common node is:

$$ \theta = \text{Tan}^{ - 1} (U) $$
(10)

7 Performance Evaluation

This segment displays the simulation outcomes of Q-(NS)2 network simulator tool that demonstrates that how well the ‘RREQ’ messages overwhelmed into the network to advance a packet from source to destination and also how far decreases the number of intermediate nodes from unnecessary ‘RREQ’ message reception. The routing protocol compared with ‘Q-DIR’, ‘ARP’ and flooding by varying the transmission range. Because of this static deployment of common node, every common node and alternate node knows its own coordinates and accepted any of the nodes go about as destination node (aside from Alternate node) inside the region. As per the assumptions, each source node knows its neighbor node ID’s and additionally destination node ID. Mobile alternate node won’t take a section in this routing procedure till it goes about as a common node. The Mobile node (Alternate node) additionally contains Q-(NS)2 protocol which will be initiated when it progresses toward becoming as the common node, till that it floods the ‘Hello’ message to the majority of its neighbor to discover whether they are alive. This simulation is performed utilizing C code.

7.1 Simulation Model

The complete network has been considered as a unit square area where the number of nodes can be varied from 200 to 2500 centered on the deployment strategy of various region selection. Sensing and transmission range of every common node are thought to be same for various simulation views. The rightmost top common node was assumed as the destination node and the source node could be arbitrarily chosen. The transmission range of the common node and alternate node plays a fundamental part in the simulation. The quantity of node being chosen for sending ‘RREQ’ has been immeasurably lessened by the transmission range of the node is getting expanded since selected the neighbor nodes that are set inside the quadrant of sink node. The selection of neighbor node for route recovery from source to sink is the way of three essential stages 1.Quadrant of Sink node 2. Distance betwixt neighbor nodes to sink node 3. Distance between. The Figure depicts that the quantity of ‘RREQ’ packet overflowed into the network radically increments for the network while expanding the region. When comparing flooding, the ARP and Q-DIR flood somewhat lesser in ‘RREQ’ however this novel protocol Q-(NS)2 floods significantly lesser ‘RREQ’ packets. The explanation for is, the number of selected neighbors are less when comparing all every one of those remaining protocols. Figure delineates that the selected number of neighbor nodes are high in flooding. When comparing flooding, ‘ARP’ and ‘Q-DIR’ has a significantly lesser number of selected neighbor nodes for further discovery. But in ‘Q-(NS) 2’ has a fewer number of selected neighbor nodes for further discovery. So, the aggregate numbers of packets from the single source towards the route discovery for different region selections on the network have been limitlessly diminished. As indicated by the number of nodes accessible in the network, the number of packets floods into the network enormously diminished in Q-(NS)2 protocol when comparing flooding, ARP and Q-DIR (Fig. 9a). Meanwhile, the aggregate number of nodes communicated with the sink is incomprehensibly expanding regarding different simulation time interim (Fig. 9b). Finally, the energy utilization comparison is made between ‘Q-DIR’, ‘ARP’ and ‘Q-(NS)2’ where Q-(NS)2 devours less energy for one packet conveyed to sink (Fig. 9c). Thus, owing to the lessening of a number of neighbor nodes for flooding, gives significantly lesser energy utilization.

Fig. 9
figure 9

simulation analysis various scenario a total number of packets used according to various region selection. b total number of nodes communicated with sink within the specified simulation time. c energy consumption analysis per packet in line with simulation time

The Alternate node has two communication range they are \( Rc = 4*Rs\,\& \,Rc = \left( {\sqrt 3 *Rs} \right) \) which implies after the substitution of the defective node, the alternate node will go about as a common node \( \left( {Rc = \left( {\sqrt 3 } \right)*Rs} \right). \) According to the region selection, the aggregate number of common node and also alternate node differed which is given in the table. Table delineates that the aggregate number of the sensor node and alternate node required to put in the sensor network in view of the communication range and selected region. It portrays less number of alternate nodes required to put among the network (Table 4).

Table 4 Simulation parameters

It can be lessened the immediate node failure among the sensor network and exceptionally helpful for area coverage in WSN. The restoration of coverage hole due to faulty node among the sensor network can well be solved with immediate replacement of alternate node. The required substitute node amongst the different square region selections can be given (Table 5) and contrasted with common node accessible at the network. Where, cn—Common node, an—alternate node (Fig. 10).

Table 5 Total number of nodes (NC & NA)
Fig. 10
figure 10

Required number of NA according to region selection

The successful comparison has been done (Table 6) in accordance with the deployment methodology and alternate node substitution technique. A total number of node required to cover the area is less because of that reason the requisite number of the alternate node is less. The table portrays that the redundant node is none and the energy loss is less when comparing at all different literatures. Owing to the deterministic method for deployment, the aggregate number of nodes is less and there be less coverage hole produced which is tolerable.

Table 6 Effective comparison of ‘NA’ deployment strategy

The efficient comparison of the ‘NA’ deployment strategy appears in Table 6. Here, the alternate node (NA) performance of the proposed system is contrasted with that of the existing system. The comparison is done concerning the number of node, redundant node, time delay, coverage hole, and energy loss. For all the comparisons, the proposed system provides the better result.

8 Conclusion

This paper shows an approach to diminish the route discovery overhead utilizing quadrant based neighbor to sink and source to neighbor process and furthermore geographical location information. This routing protocol Q-(NS)2 demonstrates improvement over the current ARP and Q-DIR and Flooding. Because of that reason, it expends less energy when comparing at all other existing which is said here. The simulation output demonstrates that it is limitlessly lessening the ‘RREQ’ message overhead by diminishing the quantity of neighbor communication towards route discovery. Simultaneously, the new alternate node placement strategy vastly reduces the unwanted redundant nodes in the network and reducing the time delay for replacement. On the whole, the Q-(NS)2 routing protocol and a new alternate node deployment strategies are much better options based on various existing strategies.