# Leveraging Energy Harvesting and Wake-Up Receivers for Long-Term Wireless Sensor Networks
## 4 MAC Protocol Leveraging Wake-up Receivers
### Analytical Study of Scalability
#### SNW-MAC:  
Collisions between packets sent by nodes belonging to the same SNW-MAC-based network are impossible as the sink specifically polls each node. Nonetheless, as receiving a packet requires a non-null duration, the receiving rate is still bounded. The total time required to receive a packet is denoted by \(\tau_{R}\) and is defined by:  
\[\tau_{R}=\tau_{d}+\tau_{o}, \tag{13}\]  
where \(\tau_{d}\) is the time required to receive the data payload and \(\tau_{o}\) is the overhead incurred by the hardware and the protocol at each packet reception (WuB sending, radio setup, turn-around time, software overhead). The maximum receiving rate in packets per minute is thus:  
\[\Gamma=\left\lfloor\frac{60}{\tau_{R}}\right\rfloor, \tag{14}\]  
where \(\left\lfloor\cdot\right\rfloor\) is the floor function. We assume that the packet generation rates of the nodes are independent of each other and are modeled by Poisson distributions of mean \(\lambda\) packets per minute, and we denote by \(A\) the aggregate rate. As Poisson distributions are stable by sum, \(A\) follows a Poisson distribution of mean \(N\lambda\) packets per minute. However, because the maximum receiving rate of the sink is \(\Gamma\), the receiving rate of the sink, denoted by \(R\), is modeled by the following distribution:  
\[\Pr\left(R=k\right)= \begin{cases}\Pr\left(A=k\right)=\frac{\left(\lambda N \right)^{k}}{k!}e^{-\lambda N}&0\leq k<\Gamma\\ \sum_{i=\Gamma}^{\infty}\Pr\left(A=i\right)=\sum_{i=\Gamma}^{\infty}\frac{ \left(\lambda N\right)^{i}}{i!}e^{-\lambda N}&k=\Gamma\\ 0&k>\Gamma\end{cases}  \tag{15}\]  
Indeed, the sink saturates when the receiving packet rate reaches \(\Gamma\), and therefore, higher receiving packet rates are impossible as the sink cannot poll the nodes quickly enough. The average packet rate is thus:  
\[\gamma_{SNW-MAC}=\mathbb{E}\left[R\right]=\sum_{k=0}^{\infty}k\Pr\left(R=k \right)=\sum_{k=1}^{\Gamma-1}k\frac{\left(\lambda N\right)^{k}}{k!}e^{- \lambda N}+\Gamma\sum_{k=\Gamma}^{\infty}\frac{\left(\lambda N\right)^{k}}{k! }e^{-\lambda N}. \tag{16}\]  
As:  
\[\sum_{k=\Gamma}^{\infty}\frac{\left(\lambda N\right)^{k}}{k!}=e^{\lambda N}- \sum_{k=0}^{\Gamma-1}\frac{\left(\lambda N\right)^{k}}{k!}, \tag{17}\]we finally have:  
\[\gamma_{SNW-MAC}=e^{-\lambda N}\sum_{k=0}^{\Gamma-1}k\frac{\left(\lambda N\right) ^{k}}{k!}+\left(1-e^{-\lambda N}\sum_{k=0}^{\Gamma-1}\frac{\left(\lambda N \right)^{k}}{k!}\right)\Gamma. \tag{18}\]  
Pseudo-asynchronous MAC:  
Using traditional pseudo-asynchronous MAC, the sink periodically wakes up to receive data packets, and the sink wake-up interval is denoted by \(T_{S}\). The time is thus divided into equal length time slots of duration \(T_{S}\). When a node generates a packet, it typically tries to send it at the sink's next wake-up. The number of packets, denoted by \(X\), generated by a given node over a time slot can be modeled by a Poisson distribution of parameter \(\frac{\lambda T_{S}}{60}\). Therefore, the probability that a node generates packets in a time slot is:  
\[p_{g}=\Pr\left(X\geq 1\right)=1-\Pr\left(X=0\right)=1-e^{-\frac{\lambda T_{S}}{60 }}. \tag{19}\]  
Let \(Y\) be the number of nodes that have generated packets over a time slot. \(Y\) can be modeled by a binomial distribution of parameter \(p_{g}\). As the \(Y\) nodes will try to send a packet at the next sink wake-up and if we assume that all the collisions are destructive, the number of packets received by the sink during a time slot is a function of \(Y\) denoted by \(R^{\prime}\left(Y\right)\) and defined by:  
\[R^{\prime}\left(Y\right)= \begin{cases}0&\text{if }Y=0\\ \mathbb{E}\left[X|X\geq 1\right]&\text{if }Y=1\\ 0&\text{if }Y>1\end{cases}  \tag{20}\]  
the last case being the collision scenario.