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

[ns] Re: Confusion in PI Controller code



Hi Jitu,
But my questions still remained unanswered.

1- How do we get these optimal values of  a, b and w in test-suite-pi.tcl?
    I could not got them by any calculations yet ?

2- In RED we set minth=5packets and maxth=3minth.
    Is this qref has any relation with it ....?
    Why we set qref specificallly equal to 6 ?

3- I know about the file tcl/ex/pi/picoeff.dat.gz. But it does not have values for any
arbitrary network toplogy.
    Actually I ran that  file ns/ex/picoeff.m on matlab. But I could not got the
values used in test-suite-pi.tcl

4-Also why some one  selected factor of 100 for multiplying with w_g , why not any
other value..

Any way thanks for your reply.
Bye,
Aun.
***********************************************************************

Jitendra Padhye wrote:

> Hi -
>
> To answer your questions:
>
> Values of a, b and w in test-suite-pi.tca, b and wl are not the most optimal
> values.  The test suite is used for regression testing, to provide some
> guarantee that the code compiles correctly on all platforms, and to
> demonstrate usage.
>
> qref is an independent variable - you can set it to whatever you want to
> achieve desired average delay.
>
> The picoeff.m is only for demo purposes. You should use the coefficient
> table in tcl/ex/pi/picoeff.dat.gz. Vishal has been promising to "validate"
> it, but he hasn't done it so far.
>
> Anyhow - the reason for multiplying N and C by 500 is to obtain values of
> a, b and w that are suitable for use in an environment when flows with
> different packet sizes (average 500 bytes) are present at the bottleneck
> link, and PI is operating in the "byte" mode.
>
> w_g is multiplied by 100 to ensure oversampling, I guess.
>
> Vishal might be able to say more about all of this - Vishal?
>
> - Jitu
>
> > 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.
> > *********************************************