[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Confusion in PI Controller code



Hi All,
Please can you explain that how you got the values of  a_ , b_ ,w_and
qref_ in the file ns/tcl/test/test-suite-pi.tcl
I am pasting the relavent portion of that file for reference ...from
CVS ...http://www.isi.edu/cgi-bin/nsnam/cvsweb/ns-2/

#######################################################################
Class Test/pi1 -superclass TestSuite
Test/pi1 instproc init {} {
    $self instvar net_ test_
    set net_ net2
    set test_ pi1
    $self next
}
Test/pi1 instproc run {} {
    $self instvar ns_ node_ testName_ net_
    $self setTopo

    set piq [[$ns_ link $node_(r1) $node_(r2)] queue]

                $piq set a_ 0.00743488595689
                $piq set b_ 0.00736090699216
                $piq set w_ 4.353741496598639e+02
                $piq set qref_ 6

    set stoptime 10.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

The topolgy of the net2 is as follows
$ns duplex-link $node_(s1) $node_(r1) 10Mb 2ms DropTail
    $ns duplex-link $node_(s2) $node_(r1) 10Mb 3ms DropTail
    $ns duplex-link $node_(r1) $node_(r2) 1.5Mb 20ms PI
    $ns queue-limit $node_(r1) $node_(r2) 25
    $ns queue-limit $node_(r2) $node_(r1) 25
    $ns duplex-link $node_(s3) $node_(r2) 10Mb 4ms DropTail
    $ns duplex-link $node_(s4) $node_(r2) 10Mb 5ms DropTail

So according to the the above given topolgy
N=2, C=1.5e6/8000=187.5 pkts/sec, R=2*(3+20+5)=56 ms,
When I put these values in the  matlab file at ns/tcl/ex/picoeff.m the
results are different ......?
Also how you set qref equals to 6 ?
AFAIK there is no guide line for qref in original paper...
#####################################

Another question is about ns/ex/picoeff.m  itself ...
Why we multiply N and C by 500 ....
Why w_g is multiplied by 100 in the sampling equation...
These Multiplying factors were not present in original paper ...

I am again pasting that part of file ....for reference ...

function [a, b, sampling] = picoeff(N,R,C)

N = N*500;
C = C*500;
.........
sampling = 100*w_g;
format long
a = numn(1);
b = -numn(2);
*********************************************
Thanks very much.
Aun.
*********************************************