# A Novel QoS-Aware ARQ Scheme for Multi-User Transmissions in IEEE802.11 ax WLANs
## 3 Methods
### The Formulation of the Optimization Problem Based on the Sliding of the Aggregation Window  
Due to the limited remaining duration, increasing the number of backups for one packet means that the backups of others are reduced. As a result, the sliding of the aggregation window differs when different backup parameters are applied. Therefore, it is important to develop an algorithm that can adaptively determine the number of backups for each packet to achieve the best performance with the limited remaining duration. The proposed algorithm aims to find a group of backup parameters under the constraints so that the fastest sliding of the aggregation window, i.e., the maximum number of the uploaded packets, is expected after the transmission. To estimate the number of uploaded packets after the transmission, the originator should obtain the status of the reordering buffer, i.e., the holes in the reordering buffer, and the number of successfully transmitted packets between two adjacent holes. The sequence number of transmitted packets is assigned cyclically from 0 to 4095 by the originator. The originator is informed of the status of the reordering buffer by the BlockACK/ACK frame. The originator updates the aggregation window according to the bitmap and the starting sequence number in the BlockACK/ACK frame to ensure that there are holes in the reordering buffer ready for the prepared packets. Thus, the originator can calculate the number of successfully transmitted packets between two adjacent holes according to the sequence numbers of prepared packets. Therefore, the number of successfully transmitted packets between the \(l-th\) packet and the \((l+1)-th\) packet and that behind the last prepared packet are obtained by  
\[\alpha_{l}= \begin{cases}(SN_{l+1}-SN_{l}+4096-1)\%4096,&1\leq l<L,\\ (SN_{END}-SN_{L}+4096)\%4096,&l=L,\end{cases}  \tag{3}\]  
where \(SN_{END}\) is the latest sequence number assigned by the originator. \(SN_{END}\) can be obtained from the sequence number assignment function. The number of packets uploaded at the end of the transmission is defined as \(S\). \(S\) depends on the transmission status of the prepared packets. Based on the upload patterns, three categories can be differentiated. **Category 1:**_There are no packets uploaded._  
As depicted in Figure 6, this category happens when the first packet in the A-MPDU fails, regardless of other packets. The probability distribution of the category is given by  
\[Pr(S=0)=P_{e,1}. \tag{4}\]  
**Category 2:**_Some packets in the reordering buffer are uploaded, while other packets are still buffered, as shown in Figure 7._  
Figure 6: The status of the reordering buffer after the transmission in Category 1. SD represents the successfully delivered packets in previous transmissions. A major requirement for this category is that packet failure occurs among the prepared packets, except for the first one. Therefore, those before the first failed packet can be uploaded, while others are not allowed. The probability distribution of the category when the first failed packet is the \(l-th\) packet in the A-MPDU is calculated by:  
\[Pr(S=\sum_{s=1}^{l-1}(1+\alpha_{s}))=(\prod_{i=1}^{l-1}(1-P_{e,i}))\times P_{e,l}. \tag{5}\]  
**Category 3:**_All packets in the reordering buffer are uploaded. Figure 8 illustrates the status in the category._  
This category is possible if all the packets in the A-MPDU are successfully transmitted.