# Buffer with N Policy and Active Management
## 4 Analysis  
In this section, we aim to establish formulae for key characteristics of the system: the queue size distribution (Theorem 1), energy efficiency (Theorem 2), and throughput (Theorem 3). The proof of Theorem 1 is significantly longer than the other two. In fact, Theorems 2 and 3 are straightforward corollaries of Theorem 1. The proof of Theorem 1, presented below, is divided into three conceptual parts, each independent of the others. In Part 1, we establish a general formula for the stationary queue size distribution using the key renewal theorem. This formula decomposes the overall queue size distribution into two integral functionals, denoted as \(A(k)\) and \(B(k)\). It is crucial that functional \(A(k)\) operates exclusively on the queue size process during the energy-saving phase, whereas functional \(B(k)\) operates exclusively on the queue size process during the transmission phase. Part 2 and Part 3 are devoted to derivations of these two functionals, respectively. Specifically, \(A(k)\) is obtained in Part 2 basing on some previous results on the queue with active management without N policy, proven in [28]. In Part 3, the regenerative property of the packet departure time is exploited to derive \(B(k)\). Based on this property, a system of equations can be constructed for the characteristic of interest (here \(B(k)\)). This method has been used for obtaining other characteristics in other queueing models as well; see, e.g., [44]. **Part 1**. In this part, we will derive a general formula on the queue size distribution. We assume that at \(t=0\), the buffer is empty, and the energy-saving phase begins. Let \(Y_{i}\), \(i=0,1,\dots\), denote the times when energy-saving phases begin, starting with \(Y_{0}=0\). Hence, each \(Y_{i}\), \(i=1,2,\dots\), is the moment the queue length decreases from \(1\) to \(0\). Let \(Z_{i}\), \(i=1,2,\dots\), denote the time when the \(i\)-th transmission phase begins. Alternatively, \(Z_{i}\) is the moment the queue length rises from \(K-1\) to \(K\), given the node is in the energy-saving phase at that moment. Note that every time a queue decreases from \(1\) to \(0\), it marks the beginning of an energy-saving phase. This is because such a decrease can only occur in the transmission phase. On the other hand, an increase from \(K-1\) to \(K\) can happen in both the energy-saving and transmission phases. Therefore, not every increase from \(K-1\) to \(K\) marks the beginning of a transmission phase, as the system may already be in transmission phase when it occurs. Each \(Y_{i}\) is a regeneration moment of process \(X(t)\), meaning that the evolution of \(X(t)\) after a specific \(Y_{j}\) is independent of the history of process \(X(t)\) before \(Y_{j}\). This property of \(Y_{i}\) arises from the fact that \(Y_{i}\) is a time when a packet transmission ends (and no new transmission starts), and the fact that the Poisson process is memoryless. Similarly, each \(Z_{i}\) is a regeneration moment of process \(X(t)\). This is because \(Z_{i}\) is both an event in the Poisson process, and a beginning of a new transmission of a packet. Denote by \(P\), the duration of the first energy-saving phase, i.e. :  
\[P=Z_{1}-Y_{0}=Z_{1}, \tag{4}\]  
by \(R\), the duration of the first transmission phase, i.e. :  
\[R=Y_{1}-Z_{1}, \tag{5}\]  
whereas by \(C\), the duration of whole first cycle of the system, i.e. :  
\[C=Y_{1}-Y_{0}. \tag{6}\]  
Note that the duration of every other energy-saving phase, i.e., \(Z_{j+1}-Y_{j}\), has the same distribution as \(P\). Similarly, the duration of every other transmission phase, i.e., \(Y_{j}-Z_{j}\)has the same distribution as \(R\). This is an outcome of the regeneration property of moments \(Y_{j}\) and \(Z_{j}\). For the same reason, the duration of every cycle, i.e., \(Y_{j}-Y_{j-1}\), has the same distribution as \(C\).