**5.1. Suboptimal multihop approach**

In this section, we present an algorithm that performs energy efficient multihop routing of sensor data. Starting with the SNs having worst channel conditions on the LR (and hence worst achievable rates and highest energy consumption), we find for each SN *k* the parent *pk* to which it can send the data with the minimum energy consumption. When the turn comes to SN *pk*, a parent *ppk* is found to which *pk* can send the data with the minimum energy consumption, thus leading to an additional hop if *ppk* � 0. The details of the proposed approach are presented below:


$$p\_k = \arg\min\_{j; j>k} |\mathcal{D}\_k| \mathbf{S}\_T \cdot \frac{(P\_{\text{Tx}, kj} + P\_{\text{Rx}, kj})}{R\_{kj}} \tag{12}$$


$$p\_K = \arg\min\_{j; p\_j \neq K} |\mathcal{D}\_K| \\ S\_T \cdot \frac{(P\_{\text{Tx}, Kj} + P\_{\text{Rx}, Kj})}{R\_{Kj}} \tag{13}$$

• **Step 7:** We set *pK* as the direct parent of *<sup>K</sup>* if (*P*Tx,*K pK*+*P*Rx,*K pK* ) *RK pK < <sup>P</sup>*Tx,*K*<sup>0</sup> *RK*<sup>0</sup> . Otherwise, we keep *pK* = 0, i.e., the best destination for SN *K* to send the data to is the BS. If *pK* is set as the parent of *K*, then update D*pK* as: D*pK* = D*pK* ∪ D*K*.

The algorithm presented in this section does not impose a limit on the number of hops. The outcome could be any number *H* such that 1 ≤ *H* ≤ *K*, where *H* = 1 indicates that all SNs send their data directly to the BS. This corresponds to a scenario where SNs are scattered to an extent such that collaboration is not energy efficient, and the best for each SN is to send the data directly to the BS. In the next section, we present a similar algorithm that performs node clustering (*H* = 2).

### **5.2. Suboptimal clustering approach**

10 Will-be-set-by-IN-TECH

In this section, we present algorithms that perform energy efficient routing of sensor data. Section 5.1 presents a multihop approach whereas Section 5.2 presents a clustering-based

In this section, we present an algorithm that performs energy efficient multihop routing of sensor data. Starting with the SNs having worst channel conditions on the LR (and hence worst achievable rates and highest energy consumption), we find for each SN *k* the parent *pk* to which it can send the data with the minimum energy consumption. When the turn comes to SN *pk*, a parent *ppk* is found to which *pk* can send the data with the minimum energy consumption, thus leading to an additional hop if *ppk* � 0. The details of the proposed

• **Step 1:** Sort the SNs in decreasing order of energy consumption without cooperation. After this step, SN *k* = 1 would be the one having the worst channel conditions on the LR and

• **Step 3:** For SN *k*, find the parent node (could be another SN or the BS) *pk* to which *k* can forward the data with the least energy consumption. The search is done over the nodes *j* having better LR channel conditions than *k*, i.e., such that *j > k*. Energy consumption to distribute the content includes the energy of *k* to transmit and the energy of *pk* to receive.


• **Step 4:** break the connection of *k* with the BS and set *pk* as the direct parent of *k* if

• **Step 5:** increment *k* and repeat Steps 3-5 on the SNs whose order is *> k* in the sorted list. • **Step 6:** After all the SNs have been assigned to their direct parent based on the most energy efficient path, we check if SN *K* can send the data with lower energy than sending it directly on the LR link, since it is still connected to the BS (due to sorting the SNs in decreasing order of LR energy consumption). Hence, if there exists an SN *x* � *K* such that *px* = 0 (i.e. there is another path to the BS that does not go through SN *K*, which means that the link between the BS and SN *K* can be broken while still being able to send the data from the SNs to the BS), then for all SNs *j < K* such that *pj* � *K*, the parent of SN *K* is


*pK* = 0, i.e., the best destination for SN *K* to send the data to is the BS. If *pK* is set as the

(*P*Tx,*kj* + *P*Rx,*kj*) *Rkj*

*Rk*<sup>0</sup> , i.e., if it is more energy efficient for *k* to send the data to *pk* rather

(*P*Tx,*Kj* + *P*Rx,*Kj*) *RKj*

*< <sup>P</sup>*Tx,*K*<sup>0</sup>

*RK pK*

(12)

(13)

*RK*<sup>0</sup> . Otherwise, we keep

SN *j* = *K* would be the one having the best channel conditions on the LR.

*pk* <sup>=</sup> arg min *<sup>j</sup>*;*j><sup>k</sup>*

*pK* <sup>=</sup> arg min *<sup>j</sup>*;*pj*� *<sup>K</sup>*

• **Step 7:** We set *pK* as the direct parent of *<sup>K</sup>* if (*P*Tx,*K pK*+*P*Rx,*K pK* )

parent of *K*, then update D*pK* as: D*pK* = D*pK* ∪ D*K*.

than sending it directly to the BS. Then update D*pk* as: D*pk* = D*pk* ∪ D*k*.

**5. Suboptimal energy-efficient WSN data routing methods**

**5.1. Suboptimal multihop approach**

approach are presented below:

• **Step 2:** Start from SN *k* = 1.

i.e.:

(*P*Tx,*k pk*+*P*Rx,*k pk* ) *Rk pk*

selected such that:

*< <sup>P</sup>*Tx,*k*<sup>0</sup>

approach. Section 5.3 presents a complexity analysis that applies to both methods.

In this section, we present an algorithm that performs energy efficient clustering for sensor data transmission. The algorithm performs a grouping of SNs into cooperating clusters, with each cluster having an SN, the cluster head (CH), receiving the data from the SNs within its cluster and forwarding it to the BS, along with its own measurements. The algorithm could lead to situations where one or more clusters contain a single SN. In this case, that SN is the cluster head and sends its data on the LR without receiving from other SNs on the SR. This corresponds to a situation where other SNs are too far or the links with them are under severe fading, such that collaboration is not energy efficient, and the best solution for that SN is to send the data directly to the BS.

Starting with the SNs having worst channel conditions on the LR (and hence worst achievable rates and highest energy consumption), we find for each SN *k* the parent *pk* to which it can send the data with the minimum energy consumption. If *k* is a cluster head, all members of D*<sup>k</sup>* are moved to D*pk* if the data transmission form *k* and all the members of D*pk* to *pk* is more energy efficient than having an independent cluster with *k* as cluster head. It should be noted that in the special case of clustering, we have D*<sup>k</sup>* = *k* ∪ C*k*. The details of the proposed approach are presented below:


$$p\_k = \arg\min\_{j; j>k} \mathbb{S}\_T \cdot \sum\_{i \in \mathcal{D}\_k} \frac{P\_{\text{Tx}, ij} + P\_{\text{Rx}, ij}}{\mathcal{R}\_{ij}} \tag{14}$$

• **Step 4:** break the connection of *k* with the BS, and the connection of all other members of D*<sup>k</sup>* with *k*, and set *pk* as the direct parent of *k* and all other SNs in D*<sup>k</sup>* if

$$\sum\_{i \in \mathcal{D}\_k} \frac{(P\_{\text{Tx},ip\_k} + P\_{\text{Rx},ip\_k})}{R\_{ip\_k}} < \frac{P\_{\text{Tx},k0}}{R\_{k0}} + \sum\_{i \in \mathcal{D}\_k, i \neq k} \frac{(P\_{\text{Tx},ik} + P\_{\text{Rx},ik})}{R\_{ik}}.$$

i.e., move all members of D*<sup>k</sup>* to C*pk* if this is more energy efficient than having an independent cluster with *k* as cluster head sending the data to the BS: C*pk* = C*pk* ∪ D*<sup>k</sup>* = C*pk* ∪ *k* ∪ C*k*.

#### 12 Will-be-set-by-IN-TECH 176 Wireless Sensor Networks – Technology and Protocols


$$p\_K = \arg\min\_{j; p\_\rangle = 0} S\_T \cdot \sum\_{i \in \mathcal{D}\_K} \frac{(P\_{\text{Tx}, ij} + P\_{\text{Rx}, ij})}{R\_{ij}} \tag{15}$$

• **Step 7:** We set *pK* as the direct parent of *K* if

$$\sum\_{i \in \mathcal{D}\_{\mathbf{K}}} \frac{(P\_{\mathbf{T} \mathbf{x}, ip\_{\mathbf{K}}} + P\_{\mathbf{R} \mathbf{x}, ip\_{\mathbf{K}}})}{R\_{ip\_{\mathbf{K}}}} < \frac{P\_{\mathbf{T} \mathbf{x}, \mathbf{K0}}}{R\_{\mathbf{K0}}} + \sum\_{i \in \mathcal{D}\_{\mathbf{K}, i \neq \mathbf{K}}} \frac{(P\_{\mathbf{T} \mathbf{x}, i\mathbf{K}} + P\_{\mathbf{R} \mathbf{x}, i\mathbf{K}})}{R\_{i\mathbf{K}}}$$

Otherwise, we keep *pK* = 0, i.e., SN *K* is a cluster head sending the data to the BS. If *pK* is set as the parent of *K*, then we update C*pK* as: C*pK* = C*pK* ∪ D*<sup>K</sup>* = C*pK* ∪ *K* ∪ C*K*.

### **5.3. Complexity analysis**

This section presents a complexity analysis that applies to both methods of Sections 5.1 and 5.2. Step 1 of the algorithms is a sorting step, and hence has a worst-case complexity <sup>O</sup>(*K*2). In Step 3, the search involves *<sup>K</sup>* nodes when *<sup>j</sup>* <sup>=</sup> 1, it involves (*<sup>K</sup>* <sup>−</sup> <sup>1</sup>) nodes when *j* = 2, etc., and 2 nodes when *j* = (*K* − 1). Hence, the complexity of Steps 2 to 5 is: *<sup>K</sup>* + (*<sup>K</sup>* <sup>−</sup> <sup>1</sup>) + ··· <sup>+</sup> <sup>2</sup> <sup>=</sup> *<sup>K</sup>*(*K*+1) <sup>2</sup> − 1. In Steps 6-7, the search involves at most *K* nodes. Consequently, the worst-case complexity of the algorithms is: *K*<sup>2</sup> + *<sup>K</sup>*(*K*+1) <sup>2</sup> − 1 + *K* = 3*K*<sup>2</sup> <sup>2</sup> <sup>+</sup> <sup>3</sup>*<sup>K</sup>* <sup>2</sup> <sup>−</sup> 1. This is a quadratic complexity of order <sup>O</sup>(*K*2). Hence, the proposed suboptimal methods are significantly easier to implement than the optimal solution of the NP-hard problem of Section 4.

In the next section, we compare the methods of Sections 5.1 and 5.2 to each other and to the non-cooperative approach.
