Priyam Chatterjee

gazecummingNetworking and Communications

Oct 26, 2013 (3 years and 9 months ago)

101 views

Control Applications in
Communications Networks



M.Tech. Seminar Report


Submitted in partial fulfillment of the requirements

for the award of the degree of



Master of Technology


By


Priyam Chatterjee

03307911



Under the guidance of


Prof. H. Pillai







Department of Electrical Engineering

Indian Institute of Technology, Bombay

Powai
-

400 076


December 2003













Acknowledgements





I woul
d like to express my sincerely thanks to my guide Prof. H. Pillai for

his
extremely patient guidance during the entire preparation of seminar.












Priyam Chatterjee









03307911

















CONTENTS :



1.

INTRODUCTION

1.1

Congestion Control in T
CP/IP

1.2

Active Queue Management (AQM)

1.3

Random Early Detection (RED)



2.

MODELLING

2.1

A Model for TCP Behaviour

2.2

AQM using RED

2.3

AQM using Proportional Control

2.4

AQM using Proportional
-
Integral Control



3.

CONCLUSION


4.

REFERENCES













1.

INTRODUCTION :



With increase
in dependence on networks like the Internet, there is an increase in
contention for the network’s resources. This contention has affected the performance of
networks. While any network performs reasonably well under light load, problems
surface when they a
re used extensively. The most notable and common problem that
networks are faced with is loss of data. While loss of data in a network can occur due to a
variety of reasons, congestion in the network is the most common reason. Loosely
speaking, congestion
refers to the loss of network performance when a network is heavily
loaded. This loss of performance can be data loss, large delays in data transmission,
which is often unacceptable. Due to this, controlling and avoiding congestion is a critical
problem in

network management and design.



The most common type of computer network is a
packet
-
switched

network, where nodes
send data in the form of packets to each other. The most common strategy used to
transfer data is
store
-
and
-
forward
. Each node waits till i
t has received a whole packet
before forwarding it at a later time to the appropriate output link. The Internet is an
example of a network that is prominently packet
-
switched. The data route from a source
to destination is computed by different methods by
routers
. When we talk about
congestion control we essentially talk about control of data packets in these routers.
Congestion occurs in a router when the aggregate
bandwidth

of incoming packets,
destined for a particular output link, exceeds the link’s ban
dwidth. An example of
congestion occurring at a router is given in Fig 1.



Fig 1 : Small congested network.


There are two types of congestion:
transient

and
persistent
. Transient congestion can be
managed with a queue of buffer at the router. During to
the congestion period the queue
will grow and contain the excess packets. When the congestion period ends, the buffered
data is forwarded to the appropriate output link. On the other hand, persistent congestion
is said to occur when the data overflows the
buffer. While transient congestion only
introduces a delay in data transmission, persistent congestion results in data loss. These
problems are tackled in two ways. Either the router detects the queue build up and
informs the sources to decrease their tran
smission rate. Such a strategy is called
Congestion avoidance.

The other method is to use end
-
to
-
end strategies where the routers
do not get directly involved but the hosts use indirect methods to detect congestion. Such
a mechanism is known as
Congestion
Control
. In TCP/IP, the most commonly used
protocol in the Internet, both methods are used to tackle problem related to congestion.


In [1], it is pointed out that the very detection of occurrence of congestion in a network
may not be very easy. The immedi
ate side effects of congestion are data loss or
unacceptable delay in transmission. However, these may be results of faulty routers or
corrupt packets. Hence these do not necessarily form good indices for congestion
detection. Also, delay or loss of perfor
mance is very much a qualitative measure. Delay
may be acceptable for one type of user and not to another. However, proper congestion
control mechanisms do result in better network performance under heavy load conditions.


1.1

Congestion Control in TCP/IP
:


TCP/IP, the widely used protocol suite in the Internet uses a window
-
based flow control
mechanism. Here both the sender and the receiver maintain a window for that session.
The sender and receiver agree on an initial window size at the establishment of
a session.
There is another window that is used. It is the congestion window,
cwnd,
and the
effective window size
swnd
is the smaller of the window size advertised by the receiver
(
rwnd)
and the congestion window.






swnd = min
(

cwnd , rwnd
)


The TCP
/IP congestion control is mainly done using the
cwnd

window. The effective
window that the sender uses to send data is the s
wnd
. The source is allowed to send the
window size of data without waiting for an acknowledgement (ACK) from the receiver.
The
swnd
shrinks by the number of bytes sent. Each packet that the source sends is
uniquely identified by a packet number. When the receiver receives a packet it sends an
ACK packet back to the source, thus signifying the receipt of all the packets before and
the n
ext packet that is expected. Depending on the number of packets (and hence bytes)
acknowledged, the sender window s
wnd

is increased again. An ACK packet also implied
that the network can handle the number of packets sent by the sender. This resulted in a
l
inear increase in the
cwnd

windows size. When a time
-
out occurs or a triplicate ACK is
received, it is interpreted as a result of congestion. Due to this, the congestion window
decreases (to a fraction, usually ½). This is the Additive increase and Multipl
icative
decrease mechanism of congestion window, by which end
-
to
-
end congestion control is
implemented. This particular variation of TCP/IP implementation is known as
TCP Reno

[3]. There are other variations of TCP/IP like
TCP Vegas

[4, 5] which can achiev
e a
better performance than TCP Reno [5]. For more on Sliding window protocols and
congestion control in TCP/IP refer [2].






1.2

Active Queue Management (AQM) :


As mentioned earlier, congestion control in a network like the Internet essentially boils
d
own to Congestion control at the routers. Routers are network layer devices used to
interconnect different networks. Their primary role is to switch packets from input links
to output links.

Braden
et al.
[6] distinguish between two classes of router algor
ithms that are related to
congestion control, i.e., queue management and scheduling: "To a rough approximation
queue management algorithms manage the length of packet queues by dropping packets
when necessary or appropriate, while scheduling algorithms det
ermine which packet to
send next and are used primarily to manage the allocation of bandwidth among flows".
The most common scheduling algorithm is FIFO (First
-
In First
-
Out), which means that
the packet that first enters the buffer will be the one to leave

the buffer first. When this
buffer fills up, that is the router cannot switch at the rate of incoming packets. It is then
that some packets are dropped. But which ones to drop depend on the policy
implemented. A straightforward solution is to drop the pac
kets that are just arriving at the
input port; that is, if a packet arrives and finds the queue full it will be dropped. This
policy is known as drop tail or tail
-
drop (DT). Other solutions include dropping the first
packet in the queue ("drop front on ful
l") or dropping a random packet already stored in
the queue. Each of these solutions has certain advantages and disadvantages (which we
will not elaborate on due to space limitations), but DT is the most widespread dropping
policy.


Fig 2 : Schematic of s
ender
-
receiver connection


Although DT is simple to implement, has been tested and used for many years, it
interacts badly with TCP's congestion control mechanisms and to lead to poor
performance. Some drawbacks of this is flow
-
synchronization and performa
nce
degradation due to excessive tome
-
outs and restarts. Motivated by these inefficiencies the
Random Early Detection (RED) scheme was introduced by Floyd and Jacobson. RED
uses randomization to solve both the synchronization and restarts problems in an ef
ficient
manner, without requiring any changes at the end hosts. Active queue management
(AQM) is the pro
-
active approach of informing the sender about incipient congestion
before a buffer overflow happens so that senders are informed early on and can react

accordingly.


1.3

Random Early Detection :


RED is an AQM mechanism. RED gateways require the user to specify five parameters:
the maximum buffer size or queue limit (QL), the minimum (min
th
) and maximum
(max
th
) thresholds of the "RED region", the maximum

dropping probability (max
p
), and
the weight factor used to calculate the average queue size (q). In RED, rather than
waiting for packet loss to occur, RED acts preemptively by taking an average measure of
the queue’s length and throttling the TCP windows
by randomly marking packets. This
random marking eliminates flow
-
synchronization and queue
-
averaging attenuates the
effects of burst traffic due to restarts and time
-
outs. However, the drawback of RED is its
difficulty in tuning.



Fig 3. RED as AQM



2.

MODELLING :


2.1

A Model for TCP Behaviour :


In [7], a dynamic model of TCP behaviour has been developed using fluid
-
flow and
stochastic differential equation analysis. Ignoring the TCP timeout mechanism, a model
is proposed as






(1)


where


denotes the time
-
derivative and




The first differential equation in (1) describes the TCP window control dynamic. The 1
/R

term models the windows additive increa
se while the
W/2

term represents the window’s
multiplicative decrease in response to the packet marking
p.

The second equation models
the bottleneck queue length. For a session, the delay in data transmission is maximum
due to the slowest link. It can be a
ssumed that it as the slowest link that packets are
buffered. Hence this bottleneck is the one that is being considered for control. The
marking probability is the probability with which a packet is marked to be dropped. This
value lies in [0,1]. The diffe
rential equation is represented in a block diagram in Fig 4.


Fig 4 : Block
-
diagram of TCP’s congestion avoidance mode.


The equation (1) is essentially a non
-
linear equation which is linearized about the
operating point {
W
0

, q
0

}, such that


(2)


We get the linearized equation (3) as


where



Doing block diagram modification we can bring it to the form shown in Fig 5.


Fig 5. Linearized dynamics illustrating the nominal dynam
ic and high
-
frequency parasitic.


Taking the plant to be
P(s)

we get,



(3)


Here

is the high frequency residual. This parasitic high frequency will affect the
behaviour of the
system at high frequencies only. The block
C(s)


is the AQM control law
that is implemented.


Fig 6. Block Diagram of Linear AQM control system




2.2

AQM using RED :


The RED active queue management control law computes the packet
-
marking probability
p a
s a function of measured queue length q. Specifically RED consists of a low
-
pass filter
(for averaging) and a packet marking profile as shown in figure 7.



Fig 7. Packet marking profile of RED


Tuning RED thus comes down to sele
ction of the low pass filter pole K, threshold levels
and the gain. The transfer function model for RED is hence


where




This gives us the nominal loop transfer function
L(s)


=
C(s) P(s) e
-
sR
0


(
4
)


This system consists of three poles. Now using classical control we know that K must be
taken outside the loop’s bandwidth, or taken less than the corner frequencies of
P(s)
.
Doing this preserves the original intent of the RED but allows the averaging fil
ter to
dominate the closed loop behaviour. This results in a small loop bandwidth. Now to
design the RED controller, we first take



(5)

and




(6)

The equations (5) and (6)
provide the guideline for tuning of RED.


Fig 8a. RED parameters chosen as simulator defaults.


Fig 8b. RED parameters chosen to satisfy equation (5) and (6).



2.3

AQM using Proportional Control :


The RED controller results in a sluggish behaviour due
to small loop bandwidth. One of
the methods to improve the response is to remove the low
-
pass filter controller. In
proportional control, the feedback is simply a scaling of the queue length, which is
proportional to the packet marking probability in the c
ontext of RED.


For proportional control,
C(s)

= K
P


The nominal loop transfer function is then



(7)


Here we can take the loop’s unity gain crossover frequency to be the geometric mean of
the corner frequencies


(8)

K
P

is chosen to make
. If we assume W
0
>2, then we get

which
leads to a positive phase margins. So we get



Fig 9. Proportional control compared to RED


In
figure 9, we see that proportional control shows better responsiveness and is more
sensitive to load variations. This can be seen from the smaller settling time than that of
RED. The reason for this is mainly the larger bandwidth in comparison to RED.


Ev
en though Proportional feedback outperforms RED, it suffers from certain limitations.
The steady state buffer length is commensurate with the proportional controller’s gain. In
cases where there is fixed maximum buffer length, it may not be possible to sta
bilize the
system for a certain system gain. Though increasing the maximum buffer length seems a
viable option but that results in a greater queueing delay. The problem arises due to
coupling between queue length and marking probability. This can be overc
ome by using
Integral control in the AQM controller
C(s).

Both RED and Proportional controllers
result in steady
-
state errors. For stable closed loop systems, integral control will drive the
steady state error to zero. This allows us to design an integral
controller for AQM which
will regulate the queue to a given operating level, independent of the load N. We use the
PI controller for this.





2.4

AQM using Proportional
-
Integral Control


A PI controller will have transfer function in the form


and the open
-
loop function using PI controller is


(9)

In the design of the controller we first choose the PI’s zero
z

to coincide with the corner
frequency of the TCP window dynamic, i.e.


Then the gain crossover frequency is taken as


where

is next chosen to set the phase margin. To meet the crossover condition
we take


(10)

a
nd the loop phase is calculated as


Choosing a suitable
we can get a positive phase margin and at that value of
,
C(s)

stabilizes the nominal delayed plant [8].


Fig 10a. PI

maintains fixed queue length independent of TCP flow level.



Fig 10b. Increasing N results in slower response, but steady state is maintained.


The above two figures compare the performance of RED and PI Control used in AQM
controller. It is see
n that with the use of PI Controller we can achieve a steady state with
the queue length being maintained at the value desired. The figure also shows that when
the number of flows is changed, the PI controller is less sensitive to changes in the TCP
flows
and number of TCP sessions.


The choice of steady state value i.e. the buffer length we wish to maintain in a router is a
trade
-
off between the queueing delay in the network and the network utilization. Larger
buffer length implies large queueing delays an
d lower values indicate lower utilization of
network resources.



3.

CONCLUSION :


Congestion control is a very important aspect of a network. Congestion is usually said to
occur when at any particular router, the rate of incoming packets for a output link
, is
greater than the capacity of the output link. The outfall of congestion is loss of network
performance in the form of packet loss and transmission delay. TCP/IP provides
mechanisms by which congestion is checked in the Internet by mean of both congest
ion
control and avoidance. Active Queue Management done in routers is one of the methods
in which congestion is avoided in a network. Also end
-
to
-
end congestion control is
provided. The former method takes into account the number of packets in the buffer a
nd
hence marks packets for dropping. This method is known as RED. In the latter method
the acknowledgements (or the loss of it) forms an indication of network state and
windows size control is done accordingly. Both these methods essentially rely on some
k
ind of feedback to identify the state of the network and to take appropriate steps. Hence,
the TCP congestion control mechanism can be treated and modeled as a closed loop
system with feedback. RED itself can be taken to be a cascade of an averaging filter

and
packet marking profile. Using control methodologies it has been shown than though RED
performs reasonably, classical control methods like proportional control in the AQM
controller can increase the system responsiveness. But steady state error cannot
be
decreased. Hence we introduce a PI controlled AQM controller, where the steady state is
brought to zero, keeping the system stable and largely invariant to changes in TCP flows
and number of sessions. This control is brought about by a predetermined ste
ady state in
the form of buffer length.


4.

REFERENCES :


[1]

Shrinivasen Keshav,

“A Control Theoretic approach of flow control”,Proceedings
of the conference on Communications architecture & protocols,pp.3
-
15,September
03
-
06,1991,Zurich,Switzerland.

[2]

Andrew S. Tanenbaum
,
Computer Networks
, Third Edition, Prentice
-
Hall of India
Private Limited 2002.

[3]

Lawrence Sivert Brakmo,
End to End Congestion Detection and Avoidance in Wide
Area Networks
, PhD Thesis, University of Arizona, 1996.

[4]

Jong Suk Ahn,
Peter B. Danzig, Zhen Liu, Limin Yan, “Evaluation of TCP Vegas:
Emulation and Experiment”, in
Proceedings of SIGCOMM ‘95
, pp. 185
-
205, 1995.

[5]

Wael Noureddine, Fouad Tobagi,
The Transmission Control Protocol,

http://
citeseer.nj.nec.com/noureddine02trans
mission.html

[6]

http://www.acm.org/crossroads/columns/connector/july2001.html

[7]

Vishal Misra, Wei
-
Bo Gong, Don Towsley, “Fluid
-
based Analysis of a Network of
AQM Routers Supp
orting TCP Flows with an Application to RED”,
in
Proceedings
of SIGCOMM ‘00
, pp. 151
-
160, 2000.

[8]

C.V. Hollot, Vishal Misra, Donald Towsley, Weibo Gong,
IEEE Transactions on
Automatic Control ’02
, pp945
-
959, June 2002.