• 沒有找到結果。

第三章 研究方法

3.3 系統架構

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

30 

而在即時性封包上,我們還另外增加更多的 pre-allocated slot,也就是 Maximum Slot。

因為 Maximum Slot 是可以在 maximum latency 內重傳 slot 數的最大限制。而 Maximum Slot 在 MR-BS scheduling 時會預先給予各個 link 包含 Maximum Slot 個數的 slot,這樣 很有可能雖然封包重傳還在 retransmission times limit 的限制內,卻因為使用到過多的 pre-allocated slot 造成 delay time 超過封包所能容忍的 maximum latency。因此我們需要 另外設限,也就是在使用 pre-allocated slot 的數量需要在 Maximum Slot 的限制之下。若 使用超過 Maximum Slot 的 pre-allocated slot,將表示這個傳送到達目的的封包就是無效 的。

所以我們除了 retransmission times limit 的限制外還需加上使用 pre-allocated slot 的 限制(using pre-allocated slot limit)。才不會造成雖然在 retransmission times limit 的限制 之下,卻早已超過 maximum latency 的限制。而 using pre-allocated slot limit 的值我們設 為 Maximum Slot 的大小,因為只要超過 Maximum Slot 就一定會超過封包的最大容忍時 間限制(maximum latency)。

using pre-allocated slot = Maximum Slot

3.3 系統架構

根據以上方法我們制定好 MR-BS 以及 RS 各別的工作,並以流程架構圖表示。圖 3-8 是 MR-BS 的運作架構,我們將該架構圖分三部份說明,第一部分是 MR-BS 一開始 的運作,第二部分是 MR-BS 處理 ACK 訊息,第三部分是 MR-BS 處理 NACK 訊息。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

及 N

如圖 3-9,

NACK 封包拆

首先 MR-B 拆開來處理

圖 3-8

圖 3-9

BS 在接受到 理。

31

8:MR-BS

9:MR-BS

到所有 AC

系統架構。

開始運作。

CK 及 NAC

K 的 feedbback 訊息後後,將 ACKK

個 pre-alloc 以上動作。

下一步將分

,若 feedba pre-allocate 0,我們就把 步驟。

所傳送出去 cated slot 在

分配的

pre-圖 3-10:

ack 訊息是 ed slot。若需

把該條 link

去的封包是否 在 link 上;

allocated sl

32

allocated slo

、ertPS 或 rt

配 Maximum 的 link 都做

nsmission t 類別的封包

limit,若超 limit,則增

們將 pre-allo 除 MS 端的

BS 端的 pre

些 pre-alloc

,若 MR-times limit,

。若是則再 超過則丟棄該 增加一個 pre

ocated slot 根 pre-allocate e-allocated

ated slot 配 e-allocated

33

根據 priori ed slot 直到

-allocated s 時性的封包 為 UGS、ert

過 using pr

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

34 

3.3.1 基地台(Base Station)

我們根據上一節的架構圖及文字敘述,寫成虛擬碼並且實作在我們的程式上。

total

S

:the total slot in DL_MAP

S

used:the current number of slot []

P :a list recording the current number of pre-allocated slot in certain link Step1:

If the ACK Channel is ACK or MR-BS Start scheduling, then go Step 3.

Step2:

If the ACK Channel is NACK, then check if exceed Retransmission Times Limit, If Yes, then drop the packet. go End.

If No, then check which link and QoS type.

If it is {UGS, ertPS, rtPS}, then check if exceed Maximum Used slot.

If Yes, then drop the packet, go End.

If No, then P[link] + 1, and reset the CD of P[link] = 2, go End.

If is not, then P[link] + 1, and reset the CD of P[link] = 2, go End.

Step3:

Check the pre-allocated slot of all link, if request to reduce a pre-allocated slot, then the CD of P[link] - 1. if CD is 0, then reduce one P[link].

Check the QoS type.

If it is {UGS, ertPS, rtPS}, then add the QoS of Maximum slot to P[link]. go Step 4.

If it is {nrtPS, BE}, then go Step 4.

Step4:

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

35 

For all link,

S

used

= S

used

+ P[link] /* the number of slot which is used */

Check if the slot we used exceed bandwidth, S

used

> S

total,

If Yes, then reduce the pre-allocated slot to each P[link] based on link priority.

If No, then check if there are remained slot which not be used, S

used

< S

total,

If Yes, then add the pre-allocated slot to each P[link] based on link priority.

If No, go Step5.

Step5:

For all link,

Add extra HARQ slots in DL-MAP of current frame.

Add extra feedback ACKCH in UL-MAP of next frame.

3.3.2 中繼站台(Relay Station)

我們將 RS 的運作流程寫成虛擬碼,並實作於我們的程式上。當封包進到 RS 時,

會先判斷是否是新的 HARQ 封包或者是 feedback 訊息,若是新的 HARQ 封包,就直接 傳送給下一個 station;若是 feedback 訊息,我們則需要判斷是在 pre-allocated slot 或是 在 normal slot 傳送成功,如果是 pre-allocated slot 傳送成功,就不做動作;若是在 normal slot 傳送成功則回傳 C0,就回 ACK 給上一個 station。若是傳送失敗,則再看還有沒有 pre-allocated slot 可以傳送,若有則重傳,若沒有則回傳 ACK[pkt] + 1。

在封包或者 feedback 訊息傳送完成後,看是否還有 pre-allocated slot 而且在 RS 上還 有封包因傳送失敗而被放入 queue 中。若有則將封包放在 pre-allocated slot 進行傳送。

若到最後,pre-allocated slot 還是有剩餘,就要求 MR-BS 扣除一個 pre-allocated slot。這 樣我們就完成 RS 的運作。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

36 

ACK[]:ACK Channel

Spre:the number of pre-allocated slot

Step1:

For all pkt

If pkt is new then transmit, go Step 4.

Else if pkt is successfully transmitted in previous transmission, go Step 2.

Else if pkt is failed in previous transmission, go Step 3.

Step2:

If pkt is transmitted in normal slot, then ACK[pkt] = C0, go Step 4.

If pkt is transmitted in pre-allocated slot, then do nothing, go Step 4.

Step3:

If pkt is transmitted in normal slot, put pkt to Queue, then ACK[pkt] = ACK[pkt] + 1, go Step 4.

If pkt is transmitted in pre-allocated slot, then S

pre

= S

pre

– 1, go Step 4.

Step4:

While S

pre

0, do

Pick a pkt from Queue, then transmit in pre-allocated slot.

S

pre

= S

pre

– 1, end while.

Step5:

If S

pre

still 0, then request MR-BS to reduce one pre-allocated slot.

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

37