Beruflich Dokumente
Kultur Dokumente
26 August, 2011
Install MF-TDMA DAMA Single terminal Run the example script Analyse the state of queue and the traffic rate Analyse the dynamics of allocation (CRs and TBTP) Enable BoD ATM and Mpeg Multiple terminals Evaluate VoIP traffic performance RRM algorithm for timeslot allocation Traffic multiplexing
26 August, 2011
Installation
Install first ns-2 (current release 2.34) MFTDMA-DAMA is installed in a different directory
Download the bundle from http://www.erg.abdn.ac.uk/users/raffaello/dvbrcs_ns2.htm Initialise the variable NSDIR=/path/to/ns Run the Makefile
26 August, 2011
We will simulate
Start Transparent satellite scenario RCSTs connect to HQ through the gateway 26.5 ms superframe duration (1ATM=16kb/s) 16 ATMs/carrier (=>256 kb/s carrier)
VoIP traffic
Packet size = 76 B ON/OFF with 46% activity 40 ms inter-packet time in ON 21.2 kb/s peak, 9.75 kb/s avg.
VoIP sources VoIP receivers
HQ
26 August, 2011
Example script
voip_atm.tcl: contains the network configuration including terminal configuration, traffic instantiation, bandwidth allocation methods and superframe definition
Number of bursts/superframe allocated permanently to each terminal (1 burst/superframe = 16 kb/s) These two parameters enable/disable the RBDC and the VBDC bandwidth request methods respectively Number of VoIP flows per terminal Smoothing parameter (alpha in [0:1]) used for rate calculation in RBDC REQUEST = alpha*RATE + (1-alpha)*PREV_REQUEST
26 August, 2011
First simulation
The following run a simulation initialising the random number generator at random:
> ns voip_atm.tcl 1 0 0 1 0
This allocates 16 kb/s in CRA to the terminal. No capacity requests are made (The smoothing par. is not significant in this simulation). Each terminal carries one VoIP flow. The simulator generates an output on screen and the following files: out.tr event.tr supeframe.ps Trace of packet that traverse each simulated queue Trace of MAC messages (TBTP and CRs) Animation of superframe dynamics
Format of out.tr
Time
h + + h + + 1.102258 1.102258 1.102258 1.102258 1.126786 1.142258 1.142258 1.142258 1.153286 1.179786
Nodes
3 3 3 3 3 3 3 3 3 3 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 exp exp exp exp exp exp exp exp exp exp
LEN
76 53 53 53 53 76 53 53 53 53 ------------------------------------------------------------0 0 0 0 0 0 0 0 0 0
Addrs
3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 3.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1
seq_no
0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1
IP packets TX (h lines)
IP packets RX
Encap Decap
MAC packets enqueued (+ lines) MAC packets received (r lines)
Queue
-1 2 3 -1 3 -1 3 -1 3 -1 -1 2 exp exp exp exp exp exp 53 76 53 53 53 53 ------------------------------------0 0 0 0 0 0 3.1 3.1 3.1 3.1 3.1 3.1 0.1 0.1 0.1 0.1 0.1 0.1 0 7 7 7 5 0 0 7 7 7 5 0
out.tr
26 August, 2011
... r 1.379072 -1 2 exp 53 ------- 0 3.1 0.1 0 0 ... r 1.405572 -1 2 exp 53 + 1.405572 2 0 exp 76 - 1.405572 2 0 exp 76 r 1.405578 2 0 exp 76 ... ... ------------------------0 0 0 0 3.1 3.1 3.1 3.1 0.1 0.1 0.1 0.1 0 0 0 0 0 0 0 0 The first MAC cell is received (satellite RTT)
The second MAC cell is received. The decapsulator can rebuild the IP packet and forward it to the HQ
IP 76 B
Packet reassembled at 1.405s and routed to HQ Encap and enqueue at 1.102s The first cell is recv at 1.379s 2 ATM cells The second cell is recv at 1.405s Form the first burst at 1.102s and send
IP 76 B
IP 76 B
LL TX
LL RX
26 August, 2011
Trace Analysis
On Unix prompt
ns voip_atm.tcl 16 0 0 1 0 grep 3 \-1 out.tr > in analy in gnuplot plot in.dat u 1:7 w l plot in.dat u 1:($2/0.1) w l
16kb/s
1 flow
Selects lines for the queue 3 1 Produces statistics of queue 3 1 Uses gnuplot to print the queue size in MAC cells and input rate in kb/s
RATE (b/s)
TIME (sec)
TIME (sec)
26 August, 2011
Now we have 2 flows (42.4 kb/s peak, 19.5 kb/s avg.) but still 16 kb/s capacity
Buffer overflows
RATE (b/s)
TIME (sec)
TIME (sec)
26 August, 2011
16kb/s CRA
5 flows
=0.8
ns voip_atm.tcl 16 1 0 5 0.8 grep 3 \-1 out.tr > in analy in grep CR event.tr > cr.tr grep ^1.*BTP event.tr > btp.tr gnuplot set key left box plot cr.tr u 2:($4*1000) w l, in.dat u 1:($2*8) w l, btp.tr u 2:($4*16000) w l
RATE (b/s)
TIME (sec)
26 August, 2011
Term.
Time
Type
1 1 0 1 0 1 0 1 1 0
0 2 0 2 0 2 0
The CR records in event.tr are traces of CR messages generated by terminals. These report the RBDC and VBDC requests in kb/s and ATM cells respectively
0 2 0
The TBTP records in event.tr are traces of TBTPs received by terminals. These report the number of ATM cells allocated in every superframe to each terminal
The variable req_period in example.tcl configures the duration of request interval The CR interval is 200ms and the smoothing parameter alpha=0.0 in this example
if { $argc != 5 } { puts "usage: ns example.tcl <CRA> <RBDC=0/1> <VBDC=0/1> <# streams/term> <smoothing par.>" exit 0 } set testing 1 ns-random 0 Allocator/MFTDMA set testing_ 0 Allocator/MFTDMA set layout_ 0 ;# First-Fit=0, Best-Fit=1 Allocator/MFTDMA set mode_ 1 ;# Slot-based=0, Continuous=1 Allocator/MFTDMA set no_carry 1 ;# Carry-Next-Frame=0, Not-CarryRequester/Combiner set req_period_ 0.2 Requester/Combiner set alpha_ [lindex $argv 4] set testing set frame_duration 1 0.0265 0ms 100Mb
26 August, 2011
Volume-based CRs
ns voip_atm.tcl 32 0 1 5 0.0 grep 3 \-1 out.tr > in analy in grep CR event.tr > cr.tr grep ^1.*BTP event.tr > btp.tr gnuplot plot in.dat u 1:7 w l, cr.tr u 2:($5/53) w l, btp.tr u 2:4 w l
In this example the request is entirely based on queue size. The system shows an oscillating behaviour
ATM cells
TIME (sec)
26 August, 2011
R-score
The R-score (ITU-T) provides a measure of perceived audio quality that:
Takes into account codec type, mouth-to-ear delay, and packet loss rate The playout delay can be adjusted dynamically using silence periods Ranges from 0 (worse) to 100 (best). Scores above 60 are acceptable Can be mapped to MOS
0.36
(output)
R-score
Equivalent MOS
Allocation efficiency
26 August, 2011
Mpeg-2 encapsulation
[]
voip_atm.tcl
# GEO satellite at 13 degrees longitude East (Hotbird 6) set sat [$ns node] $sat set-position 13 LL/Mpeg set pack_thresh 0.1 $ns node-config -satNodeType terminal \ -llType LL/Mpeg \ -ifqLen 250 \ -requesterType Requester/Combiner \ -phyType Phy/Sat set hub [$ns node] $hub set-position 43.71 10.38 $ns setup-geolink $hub $sat set hub_mac [$hub set mac_(0)] for {set i 0} { $i < $no_terminals } {incr i} { set rcst($i) [$ns node] $rcst($i) set-position 43.71 10.38 $ns at 0.0 "$rcst($i) start-req" $ns setup-geolink $rcst($i) $sat set ter_mac($i) [$rcst($i) set mac_(0)] } [] set f0 [$rrm new-frame 1 16 188] for {set i 0} {$i<$no_terminals} {incr i} { $rrm add-rule $ter_mac($i) $f0 $rrm cra $ter_mac($i) [lindex $argv 0] [$rcst($i) set requester_] set rbdc_ [lindex $argv 1] [$rcst($i) set requester_] set vbdc_ [lindex $argv 2] } []
We can simulate Mpeg2 bursts. A node has to be configured for this purpose in voip_atm.tcl
This set the default packing threshold in Mpeg2 encapsulation algorithm to 100ms
This enables the Mpeg encapsulation. Each terminal will be created using this encapsulation type
Now the cell size is 188B, so we need 188B in the a burst send a cell
The burst contains now one Mpeg cell (188B). The carrier bitrate is then: 16*8*188/26.5ms = 908kb/s and a single burst allocation in a superframe is 57kb/s
Lets see run a simulation with Mpeg and analyse the traces: ns voip_atm.tcl 104 0 0 1 0.0
26 August, 2011
MAC buffer
188B
76 B 76 B
When the Mpeg cell is received at 1.405, two IP packets are decapsulated and forwarded
When the subsequent burst arrives, the third packet is also decapsulated
26 August, 2011
ns voip_atm.tcl 32 1 0 10 0.0 grep 3 \-1 out.tr > in1 grep 4 \-1 out.tr > in2 grep 5 \-1 out.tr > in3 grep 6 \-1 out.tr > in4 analy in1 1 analy in2 1 analy in3 1 analy in4 1 grep ^1.*BTP event.tr > btp1.tr grep ^2.*BTP event.tr > btp2.tr grep ^3.*BTP event.tr > btp3.tr grep ^4.*BTP event.tr > btp4.tr gnuplot set xlabel time (sec) set ylabel rate (kb/s) plot in1.dat u 1:($3*0.424) w lp, in2.dat u 1:($3*0.424) w lp, in3.dat u 1:($3*0.424) w lp, in4.dat u 1:($3*0.424) w lp plot btp1.tr u 2:($4*16) w l, btp2.tr u 2:($4*16) w l, btp3.tr u 2:($4*16) w l, btp4.tr u 2:($4*16) w l
26 August, 2011
RRM Algorithm
The RRM first assigns timeslots in CRA. In our example, each terminal receives 2 timeslots
NB: The animation in superframe.ps can be viewed using ghostview (type gv superframe.ps)
26 August, 2011 ERG University of Aberdeen
RRM Algorithm
The remaining timeslots are assigned on demand (first RBDC requests, then VBDC). The number of timeslots depends on the request. In this example two additional timeslots are given to terminal 1 and 2, and one to terminal 4. This satisfies their RBDC requests.
26 August, 2011
S
Run 10 Simulations with different seed numbers
In our case we are interested in VoIP performance. Each simulation outputs a sample of R-score, an ITU-T metric to estimate perceived voice quality. This procedure is embedded in fullrun: http://www.abdn.ac.uk/~eng863/fullrun.htm This is called setting fullrun before the command
55.97 0.050
2.965 0.039
0.3824 0.085
1.96
< 0.01 N
This is relative error of E2E estimation with 95% confidence. This means that the E2E delay is estimated with an error of 5.2%. Then, the avg. E2E has 95% probability to be between 301.5 and 334.5
E
NB: testing var. in voip_atm.tcl must be set to 0 to avoid generating the out.tr at each run!
26 August, 2011
fullrun ns voip_atm.tcl 64 0 0 10 0.0 voip_atm.tcl 64 0 0 10 0.0 321.1 0.018 fullrun ns voip_atm.tcl 32 1 0 10 0.0 voip_amtl.tcl 32 1 0 10 0.0 322.2 0.010
56.60 0.018
2.981 0.014
0.3856 0.033
60.43 0.008
3.122 0.007
0.3586 0.023
RBDC+CRA achieves higher score than CRA only 26 August, 2011 ERG University of Aberdeen
ACCEPTABLE
Analogously, we can evaluate the r-score for other allocation strategies. In the figure we show the r-score for a VoIP flow competing with several others when allocating:
A fixed capacity (32 to 128 kb/s) RBDC RBDC and a fixed capacity (16 to 64 kb/s)
POOR
26 August, 2011
if { $testing == 1 } { $ns at 19.0 { set ps_anim [open "superframe.ps" w] $rrm trace-sf $ps_anim } } ###################################################
[]
26 August, 2011 ERG University of Aberdeen
Return Link
Forward Link
ns voip_atm.tcl 32 1 0 5 0.0 grep 3 \-1 out.tr > in analy in grep ^1.*BTP event.tr > btp.tr gnuplot set xlabel time (s) set ylabel rate (b/s) plot in.dat u 1:($2*10) w l, btp.tr u 2:($4*16000) w l
26 August, 2011
26 August, 2011
Quality/Efficiency
gnuplot set xlabel util. eff set ylabel r-score plot r1atm u 12:8:($12*$13):($8*$9) w xye 1, r1atm u 12:8 w l 1, r2atm u 12:8:($12*$13):($8*$9) w xye 3, r2atm u 12:8 w l 3
26 August, 2011
ATM vs Mpeg
We compare ATM and Mpeg with two packing thresholds under CRA. We allocate 2 Mpeg cells per superframe (113kb/s) and 7 ATM/superframe (112kb/s) for a fair comparison
Edit voip_atm.tcl to enable ATM
for i in 1 2 4 6 10 11 12 13 14; do fullrun ns voip_atm.tcl 112 0 0 $i 0.0 > $i.atm & done cat *.atm | sort k 4 n > atm
26 August, 2011