## 3 Main Design
### LACE Measurement
When estimating the short-term link correlation with \(m\) packet transmissions, we can calculate \(ci_{A,B}^{S}\) as:  
\[ci_{A,B}^{S}=\sum\limits_{k=0}^{m}ct_{A,B}^{S}(k)\cdot R(n_{r}=k) \tag{3}\]  
where \(ct_{A,B}^{S}(k)\) is the link correlation value with \(k\) common packet receptions among \(m\) packets, and \(R(n_{r}=k)\) denotes the probability with \(k\) common packet receptions. \(ct_{A,B}^{S}(k)\) is given by:  
\[ct_{A,B}^{S}(k)=\frac{k}{\sum\limits_{j=1}^{m}p_{B}^{S}(j)} \tag{4}\]  
where \(k\) denotes the number of common packet receptions and \(p_{B}^{S}(j)\) denotes the \(j\)-th packet reception probability. The denominator calculates the expected number of receptions by node B. \(R(n_{r}=k)\) is calculated as the average probability with \(k\) common packet receptions on both links:  
\[R(n_{r}=k)=\frac{\sum\limits_{\forall S_{k}\in S_{m}}(\prod\limits_{j=1}^{k}p_ {A}^{S}(j)\cdot p_{B}^{S}(j)\prod\limits_{j=k+1}^{m}(1-p_{A}^{S}(j)\cdot p_{B }^{S}(j)))}{{m\choose k}} \tag{5}\]  
where \(S_{k}\) denotes the set of \(k\) common packet receptions, \(S_{m}\) denotes the set of \(m\) packets and \(p_{B}^{S}(k)\) denotes the \(k\)-th packet reception probability. \(\prod\limits_{j=1}^{k}p_{A}^{S}(j)\) denotes the probability of \(k\) common packet receptions. \(\prod\limits_{j=k+1}^{m}(1-p_{A}^{S}(j)\cdot p_{B}^{S}(j))\) denotes the probability that the other \(m-k\) packets have no common packet receptions. For one packet transmission, the probability that both receivers receive the packet is simply the multiplication of the two packet reception rates of the two links. The reason is that from the PHY layer, a packet's reception depends only on the SINR (signal-to-interference and noise ratio). When two links have a high correlation, this means they have high fractions of common receptions. However, the receptions on one link do not depend on the other link. Therefore, a packet's receptions on two links are independent of each other. There are \({m\choose k}\) different cases with \(k\) common packet receptions. Therefore, in total, \(R(n_{r}=k)\) is the expected probability with \(k\) common packet receptions. The above calculation relies on the packet reception probability (\(p_{A}^{S}\) and \(p_{B}^{S}\)). \(p_{A}^{S}(i)\) is estimated from the SINR value for packet \(i\) and is given according to [24]:  
\[p_{A}^{S}(i)=\prod_{j=1}^{2l}(1-es_{A}^{S}(i,j)) \tag{6}\]  
The PHY layer is based on direct sequence spread spectrum (DSSS) technology employing offset quadrature phase-shift keying (O-QPSK) modulation. One byte is translated into two symbols, and one symbol is translated into 32 chip-long pseudo-random noise sequences [24]. Then, \(es_{A}^{S}(i)\) is given by:  
\[es_{R1}^{S}(i,j)= \sum_{n=1}^{32}\binom{32}{n}(ec_{R1}^{S}(i,j))^{n}(1-ec_{R1}^{S}( i,j))^{32-n}\times P_{\textit{symer}}(n) \tag{7}\]  
where \(ec_{A}^{S}(i,j)\) is the chip error rate for symbol \(j\) in packet \(i\), supposing the chip error rates are identical to the symbols. \(ec_{A}^{S}(i)\) is given by:  
\[ec_{R1}^{S}(i,j)=\frac{1}{2}(1-\sqrt{\frac{Sr_{R1}^{S}(i,j)}{1+Sr_{R1}^{S}(i, j)}}) \tag{8}\]  
where \(Sr_{R1}^{S}(i,j)\) denotes the \(j\)-th SINR sample (identical to a symbol) within packet \(i\). With the above equations, we are able to estimate \(ci_{A}^{S}\).