# An Energy-Efficient Two-Stage Cooperative Routing Scheme in Wireless Multi-Hop Networks
## 3 Proposed Two-Stage Cooperative Routing
### Two-Stage Cooperative Routing Algorithm  
Base on the optimized two-stage link cost defined above, a distributed TSCR algorithm will be illustrated in this subsection.  
Suppose that the nodes in the network will periodically broadcast the 'HELLO' packet to exchange the residual energy and channel information [25] to achieve a periodical topology discovery. Through measuring the received signal strength, each node \(i\) maintains two \(N\)-dimensional adjacency vectors, \(\mathbf{C}_{i}=\left\{\mathcal{C}_{i,j}^{\text{TSC}},j\in\mathcal{V}\right\}\) records the link cost with other nodes according to Algorithm 1, and \(\mathbf{u}_{i}=\left\{u_{i,j},j\in\mathcal{V}\right\}\) indicates the exact indexes of core helpers corresponding to \(\mathbf{C}_{i}\).  
Suppose that there is a packet \(X\) to be transmitted from \(V_{s}\) to \(V_{d}\), denote \(\mathcal{Q}\) as the set of nodes which have broadcast its own routing request (RREQ) message, and \(\mathcal{Q}\) is initiated as an empty set. The TSCR algorithm aims at finding a shortest path between \(V_{s}\) and \(V_{d}\) based on the two-stage link cost in a distributed manner and can be given as follows:  
1. Each node \(i\in\mathcal{V}\) calculates its own adjacency vector \(\mathbf{C}_{i}\) based on Equation (19) and records the corresponding core helpers \(\mathbf{u}_{i}\);\(V_{s}\) broadcasts its RREQ message where the individual adjacency vector \(\mathbf{C}_{s}\) is included, \(\mathcal{Q}=\mathcal{Q}\cup V_{s}\);
3. Based on \(\mathbf{C}_{s}\), find \(i=\underset{i\in\{V|\mathcal{Q}\}}{\operatorname{arg\,min}}(\mathcal{C}_{s,i})\). If \(i\
eq V_{d}\), node \(i\) broadcasts its RREQ message with \(\mathbf{C}_{i}\), \(\mathcal{Q}=\mathcal{Q}\cup i\);
4. Each node \(j\) updates \(\mathbf{C}_{j}\) and records the corresponding route accessing \(V_{s}\) (\(r_{j,V_{s}}\)) based on the following rules: If \(C_{s,i}+\mathcal{C}_{i,j}<\mathcal{C}_{s,j}\), update \(\mathcal{C}_{s,j}\) as \((\mathcal{C}_{s,i}+\mathcal{C}_{i,j})\) and record \(r_{j,V_{s}}\) as \(j\to i\to s\); otherwise, keep \(\mathcal{C}_{s,j}\) unchanged;
5. Repeat Step 3 and Step 4 until \(i=V_{d}\). Then, \(V_{d}\) sends a unicast route reply (RREP) message along with \(r_{V_{d},V_{s}}\) to determine the cooperative shortest path. It can be seen that the shortest path is established based on the optimized two-stage link cost, i.e.,  
\[r_{\text{TSCR}}^{*}=\underset{r\in\Omega(V_{s},V_{d})}{\operatorname{arg\, min}}\sum_{k=1}^{K}\mathcal{C}_{r_{k},r_{k+1}}^{\text{TSC}}. \tag{20}\]  
where \(K\) denotes the required number of wireless hops.  
The source data is then delivered along the routing path \(r_{\text{TSCR}}^{*}\). The \(k^{\text{th}}\) hop \(r_{k}\to r_{k+1}\) performs the two-stage cooperative transmission with \(u_{r_{k},r_{k+1}}\) as the core helper. At the first stage, node \(r_{k}\) broadcasts data to its neighbors with power \(P_{T}\) given by Equation (12). In the second stage, based on Equation (17), the transmitters in helper set \(\mathcal{T}(u_{r_{k},r_{k+1}})\) jointly beamform the data to node \(r_{k+1}\).