# A Channel Measurement-Based Listen-Before-Talk Algorithm for LTE-LAA and WLAN Coexistence
## 3 Proposed CM-LBT Scheme
### Determination of Contention Window Size and CCA Threshold  
To control the contention window size and CCA threshold in CM-LBT, we define a reward function that considers both the normalized total system throughput and the fairness between LTE-LAA and WLAN systems. The normalized throughput is the ratio of the achieved throughput over the expected throughput. Expected throughput is the throughput that would be achieved in an ideal environment. When the contention window size and CCA threshold are \(W\) and \(P_{cca}\), respectively, the reward function is as follows [5]:\[R(W,P_{cca})=\epsilon\cdot\left(\frac{S_{u}(W,P_{cca})}{S_{u}^{E}}+\frac{S_{w}(W,P_ {cca})}{S_{w}^{E}}\right)+(1-\epsilon)\cdot F(W,P_{cca}). \tag{25}\]  
where \(S_{u}^{E}\) and \(S_{w}^{E}\) represent the expected throughputs of LTE-LAA and WLAN to normalize their achieved throughputs, and \(\epsilon\) denotes a weighted factor to balance the throughput and fairness.  
Let \(F(W,P_{cca})\) denote the fairness index between LTE-LAA and WLAN systems, given the contention window size \(W\) and the CCA threshold \(P_{cca}\). The fairness \(F(W,P_{cca})\) is calculated by applying [PERSON]'s fairness index [23] formula to the normalized throughput of LTE-LAA, \(\frac{S_{w}(W,P_{cca})}{S_{u}^{E}}\), and the normalized throughput of WLAN, \(\frac{S_{w}(W,P_{cca})}{S_{u}^{E}}\). Then, the fairness \(F(W,P_{cca})\) can be obtained as follows:  
\[F(W,P_{cca})=\frac{\left(\frac{S_{u}(W,P_{cca})}{S_{u}^{E}}+\frac{S_{w}(W,P_{ cca})}{S_{w}^{E}}\right)^{2}}{2\left[\left(\frac{S_{u}(W,P_{cca})}{S_{u}^{E}} \right)^{2}+\left(\frac{S_{w}(W,P_{cca})}{S_{w}^{E}}\right)^{2}\right]}. \tag{26}\]  
We then determine the optimal values for \(W\) and \(P_{cca}\), denoted by \(W^{*}\) and \(P_{cca}^{*}\), respectively, to maximize the reward value. Thus, the optimization problem can be formulated as follows:  
\[\begin{split}\max_{W,P_{cca}}& R(W,P_{cca}),\\ \text{Subject to}& W_{min}\leq W\leq W_{max}.\end{split} \tag{27}\]  
where \(W_{min}\) and \(W_{max}\) are the minimum and the maximum contention window sizes of LTE-LAA eNB, respectively.  
To solve the above problem formulation, we propose a heuristic algorithm based on the golden section search method [24], as shown in Algorithm 1. Then, \(W^{*}\) and \(P_{cca}^{*}\) are derived as follows:  
1. The reward variable, \(R\), is initialized to 0.
2. Given the contention window size, \(W\), LTE-LAA eNB finds the value of \(P_{cca}\) that maximizes \(R(W,P_{cca})\) in Equation (27) by using the golden section search method. The pseudocode for determining \(P_{cca}\) is given in Algorithm 2, where \(\alpha<\frac{1}{2}\) is the golden ratio of the golden section search method, and a sufficiently small value of \(\epsilon\) is used [24].
3. If \(R<R(W,P_{cca})\), then \(R(W,P_{cca})\), \(W\), and \(P_{cca}\) are assigned to \(R\), \(W^{*}\), and \(P_{cca}^{*}\), respectively, and Steps 2 and 3 are repeated for every \(W_{min}\leq W\leq W_{max}\).
4. \(W^{*}\) and \(P_{cca}^{*}\) are determined as the optimal values.  
```
1:for\(W_{min}\leq W\leq W_{max}\)do
2:\(P_{cca}\gets getP_{cca}(W)\):# Algorithm 2
3:if\(R<R(W,P_{cca})\)then
4:\(R\gets R(W,P_{cca})\);
5:\(W^{*}\gets W\);
6:\(P_{cca}^{*}\gets P_{cca}\);
7:endif
8:endfor
9:return;
```  
**Algorithm 1** Determination of \(W^{*}\) and \(P_{cca}^{*}\): \(R=0\).  
```
1:while\(TRUE\)do # Golden section search method begins
2:if\(Right-Left<\epsilon\)then
3:\(P_{cca}\leftarrow(Right+Left)/2\);
4:exit a while loop;
5:else
6:\(l\gets Left+\alpha\cdot(Right-Left)\);
7:\(r\gets Right-\alpha\cdot(Right-Left)\);
8:endif
9:if\(R(W,l)<R(W,r)\)then
10:\(Right\gets r\);
11:else
12:\(Left\gets l\);
13:endif
14:endwhile # Golden section search method is completed
```  
**Algorithm 2** Determination of \(P_{cca}\): \(Left=-100\) dBm and \(Right=-43\) dBm.