12.07.2015 Views

Wireless Ad Hoc and Sensor Networks

Wireless Ad Hoc and Sensor Networks

Wireless Ad Hoc and Sensor Networks

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

120 <strong>Wireless</strong> <strong>Ad</strong> <strong>Hoc</strong> <strong>and</strong> <strong>Sensor</strong> <strong>Networks</strong>Equation 3.37 be given by Equation 3.43 with weight tuning provided by Equation3.69. Then the error in buffer occupancy, ek ( ), or packet losses, c(k),approaches asymptotically to zero <strong>and</strong> the weight estimates are bounded providedEquation 3.70 <strong>and</strong> Equation 3.71 hold.3.5 ImplementationNetwork simulator 2 (NS-2) is a discrete event simulator targeted at networkingresearch. We have selected NS-2 to implement our scheme. Forconvenience, we denoted our scheme as TQ (transmission-based queue size).3.5.1 NS-2 ImplementationIn NS-2, agents represent endpoints where network-layer packets are constructedor consumed, <strong>and</strong> are used in the implementation of protocols atvarious layers. We implement our TQ scheme at transport level. The Tqagent represents a TQ sender. It sends data to a Tq sink agent, processes itsacknowledgments, <strong>and</strong> performs congestion control. It has a separate objectassociated with it which represents an application's dem<strong>and</strong>. TQ assumesthat a packet has been lost (due to congestion) when it observes 3 duplicateACKs <strong>and</strong> it retransmits the lost packet immediately. The feedback, whichis generated at the egress node, provides the RTT. The following is a UMLstate diagram of the implementation shown in Figure 3.21.The pseudo code for this algorithm is presented below <strong>and</strong> the implementationis explained after the pseudo code.//pseudo code for TQ algorithm//notation:// Ik:packets arrive rate at the ingress node// Vk:packets departure rate at the ingress node// Uk:feedback variable from the destination// Qlevel:bottleneck queue level// Ir:packets arrive rate at the egress node// Sr:packets departure rate at the egress node// Xk:buffer occupancy at the egress node buffer// Xd:desired buffer occupancy at the egress nodebuffer// kv:diagonal gain matrix// T:measurement interval100 begin

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!