# 2021 PCS Midterm Exam
## 1
Please depict the general architecture for PCS networks, and briefly describe the functionality of each network element in this architecture.
:::spoiler Answer

* Functionality:
1. Base Station: 基地收發機站,為一個固定在一個地方的高功率多頻道雙向無線電傳送機。涵蓋範圍為一個六角形(蜂巢狀),負責接收與傳遞無線電訊號給範圍內的 Mobile Station。多個 Base Station 由一個 Base Station Controller 所控制,合在一起組成一個 Base Station System。
2. Mobile Station: 指連接到一個行動網路的一整套系統,例如一部行動電話,具有SIM(Subscriber Identity Module),和 Base Station之間可以用radio互相溝通。
3. Base Station Controller: 負責管理多個 Base Station,以及透過各種信道(channel)去管理這些 Base station所涵蓋範圍內的所有 Mobile Station,對這些 Mobile Station 執行 paging,傳輸 Data 等等無線電網路相關的任務。
4. Mobile Switching Center: 由傳統的 PSTN switch 改造而來,具有 query database(mobility database) 的能力。管理多個 Base Station Controller,負責範圍內所有 Mobile Station 的 Mobility Management,以及所有端到端連接的建立(set up)、拆除(tear down)、路由和計費。
5. Mobility Database: 包括 HLR(Home Location Register) 和 VLR(Visitor Location Register),為系統業者儲存與管理用戶資料的資料庫,例如紀錄手機目前的位置,當要執行 Mobility Management時就可以透過查詢資料庫當中的資料來做出相對應的路由等等決定。
:::
## 2
Please describe the execution of the following radio access technologies adopted in the PCS networks and list at least one PCS system that adopts any of these radio access technologies, respectively.
(a)FDMA (b)TDMA (c)FDD (d)TDD
:::spoiler Answer
(a) FDMA: Frquency Division Multiple Access,運作原理是將一塊大的頻帶切割成許多小的頻帶,每一個使用者都使用一塊小的頻帶來傳輸資料,使多個使用者可以同時做傳輸。例子: AMPS。
(b) TDMA: Time Division Multiple Access,在一個固定頻帶中,將時間切成一塊塊等長的時槽(time slot),而多個時槽組成一個訊框(frame),每個訊框的第一個時槽組成第一號通道,以此類推,而每一位使用者使用不同的通道去傳輸資料,達到分時多工。例子:IS-136。
(c) FDD: Frquency Division Duplexing,是利用頻率分隔多工技術(FDMA)來分隔傳送及接收的訊號,傳送與接收的訊號都在不同的頻帶中傳送。例子:CDMA2000。
(d) TDD: Time Division Duplexing,並非全雙工,是利用半雙工以及時間時間分隔多工(TDMA)技術去模擬全雙工,並分隔傳送及接收的訊號,傳送與接收的訊號都在同一個頻帶中傳送。例子:CT2。
:::
## 3
Please use a table to compare the high-tier,low-tier,and cordless PCS systems in terms of the cell size, user speed, coverage area, handset complexity, handset power consumption, speech coding rate, and delay.
:::spoiler Answer

:::
## 4-1
畫出 Evolution for 3G peak data rate 圖
:::spoiler Answer

:::
## 4-2.
畫出 Evolution for 3G Network Architecture 的圖
:::spoiler

:::
## 5
列出5個 network performance的 key performance indicators(KPIs)
:::spoiler Answer
1. Peak data rate (unit: Gbit/s)
2. User experienced data rate (Unit: Mbit/s)
3. Mobility (unit: Km/h)
4. Latency (unit: ms)
5. Connection density (unit: devices/$km^2$)
:::
## 6-1.
畫出 Logical Channels 圖, 並對每channel進行說明。
:::spoiler Answer

### [TCH(Traffic Channel)](https://www.rfwireless-world.com/Terminology/GSM-traffic-channel-TCH-FS-HS.html)
用來乘載user information(speech/ data),底下有三種分類,TCH/F代表Full-rate: speech 13kbps/ data 9.6kbps,而 TCH/H 代表Half-rate: speech 6.5kbps/ data 4.8kbps。另外還有一種是Enhanced full-rate (EFR) speech coders,是為了改善 speech的品質。
### CCH(Control Channel)
* CCCH(Common Control Channel)
* [PCH(Paging Channel)](https://www.rfwireless-world.com/Terminology/GSM-PCH-Paging-Channel.html)
Down link,BS用來對MS做paging,告知該MS通話已經結束(MS在idle時會監聽此channel)。
* [AGCH(Access Grant Channel)](https://www.rfwireless-world.com/Terminology/GSM-AGCH-Access-Grant-Channel.html)
Down link,network告知MS是否成功加入網路
* [RACH(Random Access CH)](https://www.rfwireless-world.com/Terminology/GSM-RACH-Random-Access-Channel.html)
Up link,MS競爭此頻道去加入network,競爭機制為 [Slotted Aloha](https://zh.wikipedia.org/wiki/ALOHAnet#%E5%88%86%E6%AE%B5ALOHA(Slotted_ALOHA))
* DCCH(Dedicated Control Channel)
* [SDCCH(Standalone DCCH)](https://www.rfwireless-world.com/Terminology/GSM-SDCCH-Standalone-Dedicated-Control-Channel.html)
Down/Up link,存在於BTS和 MS之間,這個channel 不論 TCH(Traffic Control Channel)存在與否都會存在,只用來做singaling、request call setup 和傳送 short message(簡訊)等等。
* [SACCH(Slow Associated Control Channel)](https://www.rfwireless-world.com/Terminology/GSM-SACCH-Slow-Associated-Control-Channel.html)
Down/Up link,只有TCH/SDCCH 存在時才會存在,位於BTS和 MS之間,用來傳送不緊急的Procedures。
Down link 用來傳送 power & time alignment control information,Up link 則讓MS 傳送measurement report 給network,measurement包括訊號強度、neighbor cell的訊號強度、TCH品質等等,有助於handoff decision making。
* [FACCH(Fast Associated Control Channel)](https://www.rfwireless-world.com/Terminology/GSM-FACCH-Fast-Associated-Control-Channel.html)
Down/Up link,存在於BTS和 MS之間,主要用來傳 SACCH 的慢速度來不及handle的procedure,像是 cell-establishing progress, authentication of subscriber, handoff等等,且必要的時候可以搶 TCH的time slot(偷bandwidth)。
* [CBCH(Cell Broadcast Channel)](https://zh.wikipedia.org/wiki/%E5%B0%8F%E5%8C%BA%E5%B9%BF%E6%92%AD)
Down link,存在於BTS和 MS之間,用來發送細胞簡訊,EX: 地震警告簡訊
* BCH(Broadcast Channel)
存在於BTS和 MS之間。
* [FCCH(Frequency Correction CH)](https://www.rfwireless-world.com/Terminology/GSM-FCCH-Frequency-Correction-Channel.html)
Down link,傳送continuous wave signal,使MS可以和network保持同步。
* [BCCH(Broadcast Control CH)](https://www.rfwireless-world.com/Terminology/GSM-BCCH-Broadcast-Control-Channel.html)
Downlink,用來傳送System Information messages給MS,EX: access information for a cell & info about neighboring cells,幫助 MS進行 cell selection 以及 registration 等等procedures。
:::
## 6-2
Please illustrate GSM Call Origination (Radio Aspect)
:::spoiler Answer

:::
## 7-1
Please illustrate GSM Basic Location Update Procedure.(Inter-VLR movement is assumed)
:::spoiler Answer
* Inter-VLR Location Update

兩個BS屬於不同VLR的管轄範圍(從VLR1/MSC1 移動到 VLR2/MSC2),詳細步驟如下:
1. MS 將 Location update message往上送到MSC2,其中參數包括 ( Prev_LA, Prev_MSC, Prev_VLR),==在這個case中,Prev_LA、Prev MSC 、Prev_VLR都不一樣==。
MSC2使用TCAP(七號信令)指令 - ==MAP_UPDATE_LOCATION_AREA== 將location update request forward 到 VLR2 去。這個指令的內容包括(Address of the MSC, TMSI of MS, Prev. Location Area Identification (LAI), Target LAI, Other Related Information)
2. ==但是 VLR2 並沒有 該MS的record,所以必須傳MAP_SEND IDENTIFICATION到VLR1== (VLR之間通常是有線傳輸,所以可以直接傳 IMSI)
3. VLR2 從VLR1那邊獲得確認(==MAP_SEND IDENTIFICATION_ack==)。
4. 獲得確認後,VLR2就會幫MS建立record,並向HLR發送registration message - ==MAP_UPDATE_LOCATION==,使HLR那邊的資料得以更新。
5. HLR 發送==MAP_UPDATE_LOCATION_ack== 回來給VLR2。
6. VLR2 為這個MS產生一個新的TMSI並傳送給MS,同時針對第一步傳送 ==MAP_UPDATE_LOCATION_AREA_ack==給 MSC2。
7. HLR通知 VLR1將這個MS的record刪除(==MAP_CANCEL_LOCATION==)
8. MS在VLR1的entry 被清除,VLR1回傳ack給HLR(==MAP_CANCEL_LOCATION_ack==)
:::
## 7-2
Please illustrate GSM Basic Call Termination Procedure.
:::spoiler Answer

1. 當一個PTSN使用者打了電話(MSISDN number),就會被==ISUP IAM==(七號信令)route 到 GMSC。
2. GMSC 用MSISDN 向HLR查詢該怎麼route這個call(==MAP_SEND_ROUTING_INFORMATION==)
3. HLR 使用==MAP_PROVIDE_ROAMING_NUMBER==(參數包括該MS的 IMSI, MSC nubmer)向 VLR查詢該MS的 MSRN(Mobile Subscriber Routing Number)。
4. VLR 會根據該MS在自己資料庫entry中的MSC number去 create 一個 MSRN,然後回傳給HLR(==MAP_PROVIDE_ROAMING_NUMBER_ack==)
5. HLR 再把拿到的 MSRN回傳給 GMSC(==MAP_SEND_ROUTING_INFORMATION_ack==),GMSC就知道該怎麼route這通電話。
6. GMSC 在自己和target MSC中間 sets up voice trunk,讓通話得以進行。
:::
## 7-3
What kinds of information are stored in GSM HLR and VLR?
:::spoiler Answer



:::
## 8-1
(a)Please describe how the three handoff detection mechanisms, MCHO,NCHO,MAHO,exercise. (b)List at least one PCS system that adopts MCHO,NCHO,MAHO, respectively..(C )List a table to compare the three machanisms in respects of the mobile complexity, network complexity, handoff speed,and load balancing capability.
:::spoiler Answer
* MCHO(mobile-controlled handoff)
used by DECT, PACS 等等 Low-Tier PCS,由MS去監測BS傳來的訊號強度,並依此決定要不要啟動handoff process,handoff 失敗率最低,且network端負擔小,容易implement,缺點是手機端的設計就複雜而且昂貴,且因為handoff決定權不在network端,所以無法進行load balancing。
* NCHO(network-controlled handoff)
used by AMPS和CT-2+,這兩者皆使用FDMA,因為無法轉移到其他頻率進行偵測,所以只能使用NCHO。
由Network去偵測MS的訊號強度,並決定要不要啟動handoff,缺點是失敗率高,因為當MS逐漸遠離時,訊號越來越弱,handoff process若未在失去訊號前作完就會fail,且network 端負擔重,implementation 較複雜,優點則是有能力進行BS之間的load balancing。
* MAHO(mobile-assisted handoff)
used by GSM, IS-95。由network 要求 MS去測量訊號,再根據MS傳過來的報告決定是否進行handoff。優缺點介於 NCHO和 MCHO之間,在失敗率,costs,load balancing之間取得平衡。
* 比較
|比較表 | MCHO | MAHO | NCHO |
| -------- | -------- | -------- | ---- |
| 速度 | 高 | 中 | 低 |
| 網路複雜度 | 低 | 中 | 高 |
| 手機複雜度 | 高 | 中 | 低 |
| load balancing | 低 | 中 | 高 |
:::
## 8-2
Please describe the procedure of Inter-BS handoff, MCHO is assumed.
:::spoiler Answer

假設使用 MCHO,若使用NCHO,則所有動作都必須要快,在連線還沒變弱到無法連線前作完,要不然這通通話就會被強制中止。
1. MS 找機會暫時停止和舊BS之間的通話(conversation),並在新的BS上找一個idle channel,在此channel上 signal 新BS說自己即將要開始handoff procedure,做完後再繼續和舊BS之間的通話。
2. 剛剛對新BS的signal會往上傳到MSC,MSC收到之後,會向舊的BS取得手機的加密資料將之送去新的BS,並橋接(bridge)(是誰負責bridge?)通話線路至新的BS,接著再透過舊BS通知 MS轉移到新BS上的channel。
3. MS移轉到新的BS上,繼續通話,並通知MSC自己已經移轉完成
4. MSC移除通往舊BS的通話線路,並收回相關resource。
:::
## 9
(a) Depict the SS-7 network architecture.For each network nodes, briefly describe its functionality. (b) Depict the protocol stack for the SS-7 networks, and describe the main function of each layer.
:::spoiler Answer
(a)

* SSP(Service Switching Point)
就是交換機,可以是Tandem或end office,負責電話的建立與中止,建立用戶之間的trunk,並統計用戶使用的電話費用。SSP也可以將在語音線路上的控制訊號轉成SS7信令,並放到SS7網路上傳送。
兩個不同的 SSP 之間不可以直接相連,必須透過 STP pair。
* STP(Signal Transfer Poin)
轉傳信號的router,都是成對出現,稱為STP pair,STP pair之間都是 fully connected(如圖),確保可靠性,而fully connected 保證可靠性之外,一定會有多出的link capacity,這些capacity最多可以用45 %來分擔負載。

* SCP(Service Control Point)
SCP連接到提供服務的資料庫與軟體,讓SS7信令可以支援更多功能。
(b)

| 簡稱 | 全名 | 負責工作 |
| -------- | -------- | -------- |
| MTP | Message Transfer Part 訊息轉送部 | 傳送 SS7信令 |
| ISDN-UP(ISUP) | ISDN User Part 整體服務數位網路用戶部 | 與電話線路**有關**的信令 |
| SCCP | Signaling Connection Control Part 信號連接控制部 | 與電話線路**無關**的信令 |
| TCAP | Transaction Capability Application Part 信息交易應用部 | 應用管理 |
| MAP | Mobile Application Part 行動電話應用部 | 行動電話服務 |
| OMAP | Operation Maintenance Administration Part 營運維護管理部 | 網管 |
* 詳細工作說明
MTP1就像是PHY層,定應兩個節點之間傳送乘載實體(bearer)的傳輸速率等等。MTP2就像是LINK Layer,建立兩個節點之間的Link,並對傳送的signal unit做錯誤更正。MTP3 就像是 IP layer,將MSU(Message Singal Unit)由一個節點傳送到下一個節點,並如 IP 一樣,會根據此MSU是否是給自己的,若是則傳給上層Protocol,若不是則根據destination address找出這個MSU所對應的 signaling link,再將其轉送給正確的component。

MTP3的routing功能只限於同一個營運網路,若要在不同營運網路之間傳送信令,就需要SCCP的定址模式,稱為GTT(Global Title Translation)。


> DPC: destination point code
TCAP負責處理和電話線路的建立與終止無關的服務,負責管理各種Application中的訊息交易(transaction)和操作程序(procedure),像是0800免費電話服務,以及信用卡服務等等。
而MAP負責和行動電話有關的服務,像是IS-41與 GSM MAP,而OMAP負責網管。
:::
## 10
Please describe the procedure of GSM International Call Setup Procedure
:::spoiler

Step 1
John’s GSM home system is in Taiwan, so Jenny first dials the International Switch Center Access Code (ISCA) + the Country Code (CC) + John’s MSISDN.
–
MSISDN = National Destination Code (NDC) + 6-digit Subscriber Number (SN)
–
Step 1.1. When Switch A interprets the ISCA, it identifies the call as an international call, then sets up the call to Singapore’s ISC B.
–
Step 1.2. Based on the CC, ISC B routes the call to Taiwan ISC C.
–
Step 1.3. ISC C interprets the prefix of the remaining digits, and sets up the voice trunk to GMSC D.
Step 2. GMSC D queries HLR E to obtain the MSRN.
•
Steps 3 and 4. HLR E queries VLR F.
–
Note that these message travel between Taiwan and Singapore (see Steps 3.1, 3.2, 3.3, 4.1, 4.2 and 4.3).
•
Step 5. The MSRN is returned to GMSC D.
•
Step 6. Based on the MSRN, GMSC D sets up the trunk to MSC G.
:::