View
0
Download
0
Embed Size (px)
Citation preview
1
Abstract
In this report the performance of the ALOHA protocols are analyzed in
spatially distributed wireless networks. In our system model, users/packets arrive
randomly in space and time according to a Poisson point process, and are thereby
transmitted to their intended destinations using a fully distributed ALOHA protocol .
We have seen many advantages and disadvantages of this protocol.
Our model allows simultaneous transmissions between many transmitter-receiver pairs in
the network. The methods used to reach the results are shown in the simulation results
tightly based upon the flowchart shown in this report.
2
CONTENTS
List of figures 4
1)Topic 1: Introduction 5
1.1:The Aloha Protocol (Pure Aloha) 5
1.2: Protocol Flow Chart for ALOHA 8
1.3: Advantages 9
1.4: Disadvantages 9
1.5:Applications 10
2)Topic 2: Objectives 10
2.1:How it is related to microsatellite 10
2.2:Methodology 13
2.3:Coding 14
2.4:Graphs 17
3)Topic 3:Conclusions 18
4)Topic 4:References 19
3
List of figures
Figure no. Name Page no.
1.1 Pure aloha protocol.Boxes indicate frames. 6
Shaded boxes indicate frame which are collided.
1.2 Overlapping frames in the pure ALOHA protocol. 7
Frame-time is equal to 1 for all frames
1.3 Efficiency of pure aloha protocol 8
1.4 Protocol Flow Chart for ALOHA 9
2.1 Vulnerable time for pure ALOHA protocol 12
2.2 Procedure for pure ALOHA protocol 13
2.3 Graphical output of simulation on MATLAB 17
4
1.Introduction
Aloha, also called the Aloha method, refers to a simple communications scheme in which each
source (transmitter) in a network sends data whenever there is a frame to send. If the frame
successfully reaches the destination (receiver), the next frame is sent. If the frame fails to be
received at the destination, it is sent again. This protocol was originally developed at the
University of Hawaii for use with satellite communication systems in the Pacific.
In a wireless broadcast system or a half-duplex two-way link, Aloha works perfectly. But as
networks become more complex, for example in an Ethernet system involving multiple sources
and destinations in which data travels many paths at once, trouble occurs because data frames
collide (conflict). The heavier the communications volume, the worse the collision problems
become. The result is degradation of system efficiency, because when two frames collide, the
data contained in both frames is lost.
To minimize the number of collisions, thereby optimizing network efficiency and increasing the
number of subscribers that can use a given network, a scheme called slotted Aloha was
developed. This system employs signals called beacons that are sent at precise intervals and tell
each source when the channel is clear to send a frame. Further improvement can be realized by a
more sophisticated protocol called Carrier Sense Multiple Access with Collision Detection
(CSMA).
1.1 The Aloha Protocol (Pure Aloha)
The first version of the protocol (now called "Pure ALOHA") was quite simple:
• If you have data to send, send the data
• If, while you are transmitting data, you receive any data from another station, there has been
a message collision. All transmitting stations will need to try resending "later".
Note that the first step implies that Pure ALOHA does not check whether the channel is busy
before transmitting. Since collisions can occur and data may have to be sent again, ALOHA
cannot use 100% of the capacity of the communications channel. How long a station waits until
it transmits, and the likelihood a collision occurs are interrelated, and both affect how efficiently
the channel can be used. This means that the concept of "tran
quality of the backoff scheme chosen significantly influences the efficiency of the protocol, the
ultimate channel capacity, and the predictability of its behavior.
To assess Pure ALOHA, we need to predict its
of frames.First, let's make a few simplifying assumptions:
• All frames have the same length.
• Stations cannot generate a frame while transmitting or trying to transmit. (That is, if a station
keeps trying to send a frame, it cannot be allowed to generate more frames to send.)
• The population of stations attempts to transmit (both new frames and old frames that
collided) according to Poiss
Let "T" refer to the time needed to transmit one frame
time" as a unit of time equal to
transmission-attempt amounts: that is, on average, there are
time. Consider what needs to happen for a frame to be transmitted successfully. Let "
the time at which we want to send a frame. We want to use the channel for one frame
beginning at t, and so we need all other stations to refrain from transmitt
For any frame-time, the probability of there being
is:
5
the channel can be used. This means that the concept of "transmit later" is a critical aspect: the
quality of the backoff scheme chosen significantly influences the efficiency of the protocol, the
ultimate channel capacity, and the predictability of its behavior.
Fig1.1
To assess Pure ALOHA, we need to predict its throughput, the rate of (successful) transmission
of frames.First, let's make a few simplifying assumptions:
All frames have the same length.
Stations cannot generate a frame while transmitting or trying to transmit. (That is, if a station
send a frame, it cannot be allowed to generate more frames to send.)
The population of stations attempts to transmit (both new frames and old frames that
according to Poisson distribution.
" refer to the time needed to transmit one frame on the channel, and let's define "frame
time" as a unit of time equal to T. Let "G" refer to the mean used in the Poisson distribution over
attempt amounts: that is, on average, there are G transmission
Consider what needs to happen for a frame to be transmitted successfully. Let "
the time at which we want to send a frame. We want to use the channel for one frame
, and so we need all other stations to refrain from transmitting during this time.
time, the probability of there being k transmission-attempts during that frame
smit later" is a critical aspect: the
quality of the backoff scheme chosen significantly influences the efficiency of the protocol, the
throughput, the rate of (successful) transmission
Stations cannot generate a frame while transmitting or trying to transmit. (That is, if a station
send a frame, it cannot be allowed to generate more frames to send.)
The population of stations attempts to transmit (both new frames and old frames that
on the channel, and let's define "frame-
" refer to the mean used in the Poisson distribution over
transmission-attempts per frame-
Consider what needs to happen for a frame to be transmitted successfully. Let "t" refer to
the time at which we want to send a frame. We want to use the channel for one frame-time
ing during this time.
attempts during that frame-time
The average amount of transmission
any pair of consecutive frame
during those two frame-times is:
Therefore, the probability (
T and t+T (and thus of a successful transmission for us) is:
The throughput can be calculated as the rate of transmission
probability of success, and so we can conclude that the throughput (
Vulnerable time=2*T.
6
The average amount of transmission-attempts for 2 consecutive frame-times is 2
any pair of consecutive frame-times, the probability of there being k
times is:
) of there being zero transmission-attempts between
(and thus of a successful transmission for us) is:
Fig:1.2
The throughput can be calculated as the rate of transmission-attempts multiplied by the
probability of success, and so we can conclude that the throughput ( ) is:
times is 2G. Hence, for
k transmission-attempts
attempts between t-
attempts multiplied by the
) is:
7
The maximum throughput is 0.5/e frames per frame-time (reached when G = 0.5), which is
approximately 0.184 frames per frame-time. This means that, in Pure ALOHA, only about 18.4%
of the time is used for successful transmissions.
Fig 1.3
1.2 Protocol Flow Chart for ALOHA:
Explanation:
• A station which has a frame ready will send it.
• Then it waits for some time.
• If it receives the acknowledgement then the transmission is successful.
• Otherwise the station uses a backoff strategy, and sends the packet again.
• After many times if there is no acknowledgement then the station aborts the idea of
transmission.
8
Fig 1.4
1.3 Advantages:
• Superior to fixed assignment when there is a large number of bursty stations.
• Adapts to varying number of stations.
• Simple
1.4 Disadvantages:
• Theoretically proven throughput maximum of 18.4%.
• Requires queueing buffers for retransmission of packets.
9
• Collisions , wasting slots
• Clock synchronization
1.5 Applications
• Wireless LAN
• Ethernet
• Text messaging
• Wi-Fi
• Xerox network systems
2 Objectives
2.1How it is related to MICROSATELLITE :
In the random-access methods, no station is superior to another station and none is assigned
control over another. At each instance, a station that has data to send uses a procedure defined by
protocol to make a decision on whether or not to send. This decision depends on state of medium
(idle or busy). The features that give this method its name is that there is no scheduled time for a
station to transmit. Transmission is random among the stations. That is why these methods are
called random access.
In a random access method, each station has right to the medium without being controlled
by any other station. However, if more than one station tries to send, there is an access conflict
i.e, collision and the frames will be either destroyed or modified. To avoid access conflict or to
resolve it when it happens, each station follows a procedure that answers the following
questions:
1. When can the station access the medium?
2. What can the station do if the medium is busy?
3. How can the station determine the success or failure of the transmission?
4. What can the station do if there is an access conflict?
The pure ALOHA protocol relies on acknowledgements from the receiver. When a
station sends a frame, it expects the receiver to send an acknowledgement. If the
10
acknowledgment does not arrive after a time-out period, the station assumes that the frame (or
the acknowledgment) has been destroyed and resends the frame.
A collision involves two or more stations. If all these stations try to resend their frames
after time-out, the frames will collide again. Pure ALOHA dictates that when the time-out period
passes, each station waits a random amount of time before resending its frame. The randomness
will help avoid more collisions. We call this time the backoff time TB.
Pure ALOHA has a second method to prevent congesting the channel with retransmitted
frames. After a maximum number of retransmission attempts Kmax, a station must give up and try
later. Figure shows the procedure for pure ALOHA based on the above strategy.
The time-out period is equal to the maximum possible round-trip propagation delay,
which is twice the amount of time required to send a frame between the two most widely
separated stations (2 x Tp ). The backoff time TB is a random value that normally depends on K
(the number of attempted unsuccessful transmissions). The formula for TB depends on the
implementation. One common formula s the binary exponential backoff. In this method, for each
retransmission, a multiplier R=0 to 2k – 1 is randomly chosen and multiplied by Tp (maximum
propagation time) or Tfr (the average time required to send out a frame) to find TB. Note that in
this procedure, the range of the random number increases after each collision. The value of Kmax
is choosen as 15.
Vulnerable time:
The length of time in which there is possibility of collision is known as vulnerable time.
We assume that the stations send fixed length frames with each frame taking Tfr seconds to send.
Figure shows the vulnerable time for station B
11
Fig 2.1: vulnerable time for pure ALOHA protocol
from the figure it is clear that the collsion occurs between the frames sent by station A,B and C.
We see that the vulnerable time during which a collision may occur in pure ALOHA is 2 times
the frame transmission time.
Pure ALOHA vulnerable time= 2 x Tfr
12
2.2 METHODOLOGY:
FLOW CHART:
Flow chart for pure ALOHA is as mentioned below
Fig 2.2 : Procedure for pure ALOHA protocol
•In pure ALOHA, the stations transmit frames whenever they have data to send.
•When two or more stations transmit simultaneously, there is collision and the frames are
destroyed.
•In pure ALOHA, whenever any station transmits a frame, it expects the acknowledgement from
the receiver.
13
•If acknowledgement is not received within specified time, the station assumes that the frame (or
acknowledgement) has been destroyed.
•If the frame is destroyed because of collision the station waits for a random amount of time and
sends it again. This waiting time must be random otherwise same frames will collide again and
again.
•Therefore pure ALOHA dictates that when time-out period passes, each station must wait for a
random amount of time before resending its frame. This randomness will help avoid more
collisions.
• Whenever two frames try to occupy the channel at the same time, there will be a collision and
both will be damaged. If first bit of a new frame overlaps with just the last bit of a frame almost
finished, both frames will be totally destroyed and both will have to be retransmitted.
2.3 CODING :
MATLAB CODE FOR PURE ALOHA
runtime=0.2;
nstation=10;
netthrou=10e6;
fsize=8000;
for frate=1:5:150
trh=frate/10000;
wwind=100;
tr=zeros(1,nstation);
tq=zeros(1,nstation);
tcnt=zeros(1,nstation);
colis=zeros(1,10000*runtime);
colin=zeros(1,nstation);
rwait=zeros(1,nstation);
trkeep=zeros(nstation,10000*runtime);
pakeep=0;
for i=1:10000*runtime
14
for j=1:nstation
if tr(j)==1
trkeep(j,i)=1;
end
if tcnt(j)>0
tcnt(j)=tcnt(j)-1;
if tcnt(j)==0
tr(j)=0;
if colin(j)==1
rwait(j)=ceil(wwind*rand(1,1));
tq(j)=tq(j)+1;
colin(j)=0;
end
end
else
if tq(j)>0 & rwait(j)==0
tr(j)=1;
tcnt(j)=ceil(fsize/netthrou*10000);
tq(j)=tq(j)-1;
end
end
pa=rand(1,1);
if pa<trh
pakeep=pakeep+1;
if tr(j)==0 & rwait(j)==0
tr(j)=1;
tcnt(j)=ceil(fsize/netthrou*10000);
else
15
tq(j)=tq(j)+1;
end
end
if rwait(j)>0
rwait(j)=rwait(j)-1;
end
end
if sum(tr)>1
colis(i)=1;
for k=1:nstation
if tr(k)==1
colin(k)=1;
end
end
end
end
px1(frate)=(pakeep-sum(tq));
py1(frate)=pakeep;
end
g1=[0:0.01:1.2];
s1=g1.*exp(-2*g1);
figure(1)
plot(px1*8000/runtime,py1*8000/runtime,'x',s1*1e7,g1*1e7,'-')
grid
xlabel('Throughput (bps)')
ylabel('Arrival Rate (bps)')
17
Conclusion
Simulations have been performed on the ALOHA protocol separately to fully understand
their inherent properties. This is done in the context of a new modeling
framework that allows for simultaneous communication between several transmitter
receiver links in a continuous-time system. Users/packets arrive randomly in space and
time according to a Poisson point process, and are transmitted to their destinations and
then used to determine the performance advantage that ALOHA provides. The simulation
results show the performance ALOHA.