owned this note
owned this note
Published
Linked with GitHub
# Plan your Job.
###### tags: `BMW Lab.`
Welcome to BMW Lab., one of the skills you need to learn is planning your job. Your action item should consist of three main components: task name, outcome, and deadline. The outcome should be clear enough for everyone to verify that you have finished your job.
In this page, we use your master thesis as an example to show you how to do it. You can adopt the concept for planning your job.
:::success
//////////////////////////////////////////TTT///////////////////////////////////////////
## YourName
* [ ] Step 1. Summarize the background knowledge (with text and figures)
* [ ] Step 2. Define the problem by specifying the system model you considered (specify I/P parameters, draw system architecthre and timing diagram)
* [ ] Step 3. Draw a timing dirgram showing the concepts you learned
* [ ] Step 4. Write a simulator to verify the concept.
* [ ] Step 5. Implement a simulator. Use the values you generated from the simulator and verified them one-by-one based on Step 3.
* [ ] Step 6. Show us the simulation results
:::
Let's take IEEE 802.11ax uplink OFDMA random access (UORA) as an example. Here is a list of outcomes you should show me if you claim that you understand UORA.
## Step 1: Background knowledge
The IEEE 802.11ax standard adopts an orthogonal frequency division multiple access (OFDMA) technology and divides sub-carriers into smaller sub-channels named resource unit (RU) to enable multiple users simultaneous transmissions. The 802.11ax introduces a triggered uplink access (TUA) to improve the efficiency of carrier sense multiple access with collision avoidance (CSMA/CA). In TUA, an AP gets the shared wireless channel by transmitting a *Trigger Frame (TF)* after sensing channel as idle for PCF interframe space (PIFS). The TF identifies stations (STAs) participating in the uplink multi-user transmissions and assigns RUs to these STAs. The association identities (AIDs) of the STAs are indicated in *AID12* subfield of *User Info* field in the TF. Upon the reception of the TF, the STAs should wait for short interframe space (SIFS) and sends their packets back to the AP using the assigned RUs. The AP will wait for SIFS and transmit a multi-STA BlockAck frame for the acknowledgment of successful STAs [[802.11ax Standard]](https://www.dropbox.com/s/tsetf5r121c3bcz/Draft%20P802.11ax_D3.3.pdf?dl=0).
The AP may support an uplink OFDMA-based random access (UORA) scheme by reserving one or more RUs as *random access RUs (RA-RUs)* for random access. The AID12 subfield corresponding to these RA-RUs is set to 0 (for STAs associated with the AP) or 2045 (for STAs not associated with the AP) in TF. An STA, which has a frame pending for transmission using UORA, should set its OFDMA contention window (OCW) to $OCW_{min}$ and randomly choose an OFDMA backoff (OBO) counter in the range of 0 and OCW. Upon the reception of a TF, the STA decrements its OBO counter by the number of RA-RUs in the TF. The STA should randomly select one of the RA-RUs to transmit its frame if its OBO counter reaches zero. The transmission is successful if the STA receives an acknowledgment from the multi-STA BlockAck. Collision occurs if two or more STAs select the same RA-RU to transmit their packets. Collided STAs shall update its OCW to (2×OCW + 1) (i.e., OCW $\leq OCW_{max}$) and repeat the transmission procedure of UORA until a retry limit (i.e., maximum number of successive re-transmission attempts) is reached. Note that $OCW_{min}$ and $OCW_{max}$ are specified in the *UORA Parameter Set* of the 802.11ax standard.
[Extra Reference](https://scholar.google.com/scholar?cluster=16767702542490394972&hl=zh-TW&as_sdt=2005&sciodt=0,5&as_ylo=2016)
## Step 2: System model
This paper considers an 802.11ax AP serving $M$ STAs. Fig. 1 shows a timing diagram of the system model considered in this paper. It is assumed that time is divided into fixed-length slots. The length of a slot is equal to one PIFS plus a transmission opportunity (TXOP) reserved for a single packet transmission for UORA. The TXOP is the time required to transmit/receive a TF, RA-RUs, a *Multi-STA BlockAck* frame and two SIFSs. In each TF, the AP reserve $R$ RUs as RA-RUs. The AP utilizes the TF in the first slot to trigger the $M$ STAs for transmitting one packet through $R$ RUs simultaneously using UORA. Upon the reception of the first TF, $M$ STAs select their initial OBO counters simultaneously and wait for transmitting their packets.
Let $OCW_{min}$, $OCW_{max}$, and $L_{max}$ be the initial OCW, maximum OCW, and the retry limit for all STAs; and $OCW_{i}$ ($1\leq i$$\leq L_{max}$) be the OCW of the $i$th transmission. Thus,
\begin{equation}
OCW_i=\left\{\begin{matrix}
OCW_{min}, & i=1. \\
min(2*OCW_{i-1},OCW_{max}),& i=2,...,L_{max}.
\end{matrix}\right.
\end{equation}

Fig. 1. An example of 'timing diagram' considered in this paper.
## Step 3: Draw figures to show the concepts you learned.
### 3a. Specify the constants you used in the figures.
| I/P Parameters | Value |
| ----------------- | ------|
|$R$: # of RU | 5,10,15 |
|$L_{max}$: retry limit(max. # of content)| 1,3,5 |
|$OCW_{min}$: initial OCW|7,15 |
|$OCW_{max}$: max. OCW| 31 |
| Variables | Meaning |
| ------------ | ------|
|$OCW_{i}$| OCW of the $i$th transmission, $1\leq$ $i\leq L_{max}$ |
|$OBO^{k}_{i}$ | OBO counter of the $k$-th STA during its $i$th transmission |
### 3b. Draw a timing diagram showing the transmission behavior of a STA.
X-axis: slot; Y-axis: OBO counter
For R=2,
:::spoiler Cheak my answer after try it yourself
[](https://i.imgur.com/zbY8KTH.png)
[](https://i.imgur.com/ZfzTJxt.png)

:::
For R=10,
:::spoiler Cheak my answer after try it yourself
[](https://i.imgur.com/dyTVlBA.png)

:::
## Step 4: Use a simulator to verify your results
### 4a. Define the parameters (their ranges need to be specified) and data structures to be used in your simulator
|I/P|Value in simulator|
| -------- | ------|
|$M$: # of STAs | [10:10:100]|
|$R$: # of RU | 5,10,15 |
|$L_{max}$: retry limit| 1,3,5
|$OCW_{min}$: initial OCW| 7,15
|$OCW_{max}$: max. OCW| 31
|$OCW_{i}$($1\leq i\leq L_{max}$): OCW of the $i$th transmission | $OCW_{1}=OCW_{min}$, $0\leq OCW_{i} \leq OCW_{max}$
|$N_{SL}$: # of oneshot period for sample| 10^6
|Counters|Range|
|-|-|-|
|x: the $x$-th sample |0~$N_{SL}$, |$N_{SL}\geq 10^6$
|j: the $j$-th slot |1~$I_{max}$ |
|k: the $k$-th STA |1~M|
\begin{equation} I_{max}= \sum_{i=1}^{L_{max}} \lceil\frac {OCWi}{R}\rceil \end{equation}
#### STA's Data structure
| Variable | Meaning | Data Type| range |
| -------- | -------- | -------- |-------- |
| k | STA ID | Integer | 1~M |
|$OBO^{k}_{m}$ | OBO counter of the $k$-th STA during its $m$th transmission | Integer |0~$OCW_{max}$|
||
|$M_{i,S}[n]$| the average number of STAs that successfully contend RA-RUs for the $n$th time in the $i$th slot. |Integer| 0~$M$
|$M_{i}F[n]$| the average number of STAs that fail to contend RA-RUs for the $n$th time in the $i$th slot.|Integer|0~$M$
|$Lmax$|
==> 底下大部分都錯,請重列
==> 同樣的變數請勿重複定義
||$i$:retry transmision attempt|$[0,L_{max}]$
| array[ $L_{max}$ ] |the $i$th collision is on which slot| [0,end of the slot]
||$N_{success}$ : the # of successful transmission
||$T_{success,t,k}$ : the slot of the k-th STA transmit successfully in the t-th test of simulation
||$N_{attempt,t,k}$ : the # of attempts of the i-th STA that in th
==> 請先將以下的參數的公式列出,根據公式,你就知道應該要統計哪些變數
|O/P|
|-|-|
|$P_{s}$ : access success probability |
|$\overline{D_{}}$ : mean access delay
|$\overline{N_{STA}}$ : average transmit STA per slot
|$U$ : Utilization
\begin{equation} I_{max}= \sum_{i=1}^{L_{max}} \lceil\frac {OCWi}{R}\rceil \end{equation}
- 
- 
- 
- 
### 4b. Draw the flowchart of UORA simulator using the parameters defined in 4a
! [](https://i.imgur.com/6HAJbSm.png)
```flow
st=>start: Start
e=>end: End
op=>operation: Initailization
R, OCWmin, OCWmax, Lmax
x=10^6…
op2=>operation: set j=0(slot)
op3=>operation: Get average of Access success prob.
/ Mean access delay/ CDF of # of transaction
op4=>operation: N_success = Total # of STA successful
in this test/S_success,k /N_attempt,k
op5=>operation: get single test value of N_success
S_success,k, N_attempt,k
op6=>operation: x--
op7=>operation: j++
op8=>operation: Set k=M(STA)
op9=>operation: # of successful transmission ++,
Slot_Success= j-1, STAend[k] =1
op10=>operation: # of fail transmission ++,
Slot_Fail = j-1 , STAend[k]=1
op11=>operation: Reg Slot_Fail_i = j-1
op12=>operation: STA[k].OBO = rand()%OCWi +1
op13=>operation: STA[k].OBO-R
op14=>operation: Set flag_k=true;
Rk = Rand()%R+1,
Reg RU[Rand()%R+1] += 1
op15=>operation: k--
cond=>condition: for (x=10^6;x>0)
cond2=>condition: if all STA reach end
(Slotend == true)
cond3=>condition: for (k=M ;k > 0)
cond4=>condition: If STAend[k] =0
cond5=>condition: j== 1
cond6=>condition: flag_k==true
(if choose RU at j-1)
cond7=>condition: RU[Rk]>1
at slot j-1(collided)
cond8=>condition: i+1 ⩽ Lmax
cond9=>condition: STA[k].OBO =0
st->op->cond
cond(yes)->op2->cond2
cond(no)->op3->e
cond2(yes)->op4->op5->op6->cond
cond2(no)->op7->op8->cond3
cond3(yes)->cond4
cond3(no)->cond2
cond4(yes)->cond5
cond4(no)->op15
cond5(yes)->op12
cond5(no)->cond6
cond6(yes)->cond7
cond6(no)->op13
cond7(yes)->cond8
cond7(no)->op9->op15
cond8(yes)->op11(left)->op12->op13->cond9
cond8(no)->op10->op15
cond9(yes)->op14->op15
cond9(no)->op15
op15->cond3
```
==>請直接修改這張圖,圖上請用你已經定義過的參數(e.g., i, j, k),圖上應該會有i++, j++, k++, 以及迴圈是否繼續的判斷條件
### 4c. Use examples gave in 3b to verify your simulation results
### 4d. Show us the figures of performance metrics.
The performance metrics considered in this paper includes the access success probability, $P_S$, mean access delay, $\bar{D}$, CDF for number of transmissions
---