|
NS2 ภาค ก่อนปรับ scenario ใหม่ ตอน Propagation Model
จากการรันไฟล์ 00_wireless_tor_3_nodes_energy.tcl ก็ต้องปรับอะไรๆให้ตรงกับความเป็นจริงมากขึ้น
เริ่มจาก Propagation Model โดยอ่านจาก NS2 manual Chapter 18 โดยเนื้อหามันออกเป็นทฤษฏีอย่างแรง จน งง ตามระเบียบ แต่สรุปได้ว่า Shadowing Model จะตรงกับความเป็นจริงที่สุด เพราะ Free Space Model กับ Two-Ray Ground Reflection Model จะมีลักษณะของสัญญาณเป็นวงกลมดิ๊ก ซึ่งจริงๆแล้ว สัญญาณจะสะท้อนไปมา จนโหนดได้รับสัญญาณจากหลายทิศทางซึ่งมีความแรงแตกต่างกันไป (fading Effect) ก็เลยขอเลือก Shadowing Model มาใช้
#การ config Shadowing Model เอามาจาก manual
Propagation/Shadowing set pathlossExp_ 2.0 ;# path loss exponent Propagation/Shadowing set std_db_ 4.0 ;# shadowing deviation (dB) Propagation/Shadowing set dist0_ 1.0 ;# reference distance (m) Propagation/Shadowing set seed_ 0 ;# seed for RNG
#การคำนวน communication rage กำหนดโดยคำสั่ง
Phy/WirelessPhy set RXThresh_
ซึ่งค่า RXThresh_ ได้มาจากการใช้โปรแกรมที่อยู่ใน ~/ns-allinone-2.28/ns-2.28/indep-utils/propagation ซึ่งต้อง compile threshold.cc ก่อน ด้วยคำสั่ง g++ threshold.cc -o threshold
จึงรัน $ ./threshold USAGE: find receiving threshold for certain communication range (distance)
SYNOPSIS: threshold -m (propagation-model) [other-options] distance
(propagation-model): FreeSpace, TwoRayGround or Shadowing [other-options]: set parameters other than default values:
Common parameters: -Pt (transmit-power) -fr (frequency) -Gt (transmit-antenna-gain) -Gr (receive-antenna-gain) -L (system-loss)
For two-ray ground model: -ht (transmit-antenna-height) -hr (receive-antenna-height)
For shadowing model: -pl (path-loss-exponent) -std (shadowing-deviation) -d0 (reference-distance) -r (receiving-rate)
มันจะคำนวนค่า RXThresh_ ออกมาให้ เช่น $ ./threshold -m Shadowing -pl 5 -std 7 50 distance = 50 propagation model: Shadowing
Selected parameters: transmit power: 0.281838 frequency: 9.14e+08 transmit antenna gain: 1 receive antenna gain: 1 system loss: 1 path loss exp.: 5 shadowing deviation: 7 close-in reference distance: 1 receiving rate: 0.95
Receiving threshold RXThresh_ is: 4.34193e-14
Create Date : 16 พฤษภาคม 2548 |
Last Update : 16 พฤษภาคม 2548 1:38:30 น. |
|
2 comments
|
Counter : 539 Pageviews. |
|
|
|
โดย: Jeab IP: 134.28.254.10 วันที่: 4 กันยายน 2551 เวลา:18:48:22 น. |
|
|
|
โดย: ดีจร้า IP: 192.168.1.199, 222.123.176.146 วันที่: 10 พฤศจิกายน 2552 เวลา:15:23:12 น. |
|
|
|
| |
|
|
I would have a question about the receiving rate of the shadowing model (here, it is set 0,95). Could you kindly explain this parameter relevant to the communication range?
Thanks ka, Jeab