# Novel Reliable and Energy-Efficient Routing Protocols for Wireless Sensor Networks
## 3 The Model  
WSNs consist of a number of nodes which are deployed randomly in a sensing field. The network is represented by a graph \(G(V,E,d)\), where set \(V\) refers to the nodes \(N=|V|\), while set \(E\) denotes the edges and \(d_{ij}\), \((i,j=1,\ldots,N)\) are the distances between the nodes, which are arranged in a distance matrix, and the distance represents the weight of the corresponding edge. Packets are forwarded from the nodes to the BS in the form of multi-hop routing. In multi-hop protocols, the nodes use each other to relay the packets until packet is finally received by the BS. Based on the Rayleigh fading model [18], the energy \(g_{ij}\) needed for transmitting a single packet over distance \(d_{ij}\) with the probability of successful transmission between node \(i\) and node \(j\) denoted by \(P_{ij}\) is given as:  
\[g_{ij}=-d_{ij}^{\alpha}\frac{\theta\sigma_{Z}^{2}}{ln\Big{(}P_{ij}\Big{)}} \tag{1}\]  
where \(\theta\) is the so-called modulation and coding constant [26], \(\sigma_{Z}^{2}\) denotes the power of noise, \(\alpha\) is the large-scale path loss exponent (usually \(2\leq\alpha\leq 6\)). The reliability constraint is expressed by a predefined data loss percentage \(\varepsilon\); where the probability of overall success of packet transmission from the source node to the BS is supposed to fulfil \(\Pi_{j=0}^{m}P_{l_{j}l_{j+1}}=1-\varepsilon\), in case of using \(m\) relay nodes to forward packets to the BS. We adjust \(g_{ij}\) to get same \(P_{ij}\) for all nodes, then \(P_{ij}=\sqrt[n]{1-\varepsilon}\). The energy of the network at time \(k\) is described by an energy state vector \(c(k)=(c_{1}(k),\ldots,c_{N}(k))\) where \(c_{i}(k)\) represents the available battery power at node \(i\) at time instant \(k\). We assume that all the nodes have the same initial energy at time instant \(0\), i.e., \(c_{i}(0)=E\
u,\ i=1,\ldots,N\). When seeking a path for a maximum \(m\) relay node from the source node \(s\) to the BS, we search for a set of indices \(R=\{l_{1},\ldots,l_{m}\}\) referring to the relay nodes participating in the packet transfer, where the first source node, \(s\), sends the packet to node \(l_{1}\) then the packet is forwarded to node \(l_{2}\) and so on, and finally from node \(l_{m}\) to the BS. Each node has a copy of the routing table which is calculated and broadcasted by the BS. In the forthcoming discussion, we assume that the BS has full information on the distance matrix of the network and, as a result, it has the routing table of all nodes. The BS updates its version of the energy state vector after receiving each packet, by which it perceives of the remaining energy and the existence of the nodes. With each round, it runs the proposed algorithms to calculate the optimal path from each node according to the energy state vector, the predefined data loss percentage \((\varepsilon)\), and predefined maximum number of hops. The updated routing table is then broadcast to all nodes. We also suppose deterministic transmission, where the nodes transmit the same amount of data in a predefined frequency (periodically), and each node forwards packets according to its routing table. One may say that this procedure will increase the energy consumption due to the frequency of BS broadcasting. However, the energy needed for receiving is significantly less than the energy needed for transmission [15]; it does not depend on the distance; it just depends on the size of the received information. The information received by the nodes is a short control message; it consists of the ID of the node, the ID of the next relay node, and the ID of the source node. Moreover, nodes eliminate the overhead required for chain or path setup, as with PEGASIS and LEACH [8; 15]. The BS, with its high energy and high computational capabilities, does all the work--this configuration is used for the majority of IoT systems.