Aloha | Network Packet | Computer Networking

MLDesign Technologies, Inc.

www.mldesigner.com

ALOHA Protocol
This is a brief summary of an MLDesigner model that simulates both ALOHA and Slotted ALOHA protocols. It demonstrates modeling techniques and shows the protocol design capability of MLDesigner. ALOHA is a random (or contention) access protocol developed at the University of Hawaii for sharing broadcast channel access among a number of users with relatively low throughput demand. There are two main ALOHA versions: unslotted, which has no coordination between system stations, and slotted, which uses a master clock to provide synchronized channel time slots to improve throughput . ALOHA protocols are often used in satellite communications systems and cellular radio systems and are a precursor to the popular Ethernet protocol..

1. Model Overview
This ALOHA model uses satellite connections between stations. The model consists of three top-level modules: an earth station (Single_Earth_Station), a central satellite station (Satellite_Station) that serves as the communications link between the earth stations and a statistics module (AlohaStatistics.) To simplify the design, collision detection, transmission delay and satellite round-trip delay are all implemented in the satellite. If the satellite detects a collision while receiving a packet, it tags the packet to indicate collision before broadcasting it to all earth stations. The transmitting earth station continues to retransmit the packet until it receives the packet back from the satellite without a collision flag. At that point, it discards the packet and begins to transmit the next packet in its queue. In this implementation each earth station has at most one outstanding packet and all packets are of equal size. The earth station module supports both regular ALOHA and slotted ALOHA operation. Data structures are used to represent the packets and to indicate slotted and unslotted operation. The ALOHAStatistics module contains all the statistics collection and reporting operations. The MLDesigner system, shown in Figure1, consists of 20 earth stations communicating through a satellite. It can be expanded or reduced by adding or removing earth station modules and adjusting one configuration parameter. A second parameter selects slotted or unslotted operation.

1

com M ReceiveMemory M SendMemory Satellite_Station#1 M SafePacketsMemory M CollisionPacketsMemory AlohaStatistics#1 Single_Earth_Station#1 Single_Earth_Station#8 Single_Earth_Station#15 Single_Earth_Station#2 Single_Earth_Station#9 Single_Earth_Station#16 Single_Earth_Station#3 Single_Earth_Station#10 Single_Earth_Station#17 Single_Earth_Station#4 Single_Earth_Station#11 Single_Earth_Station#18 Single_Earth_Station#5 Single_Earth_Station#12 Single_Earth_Station#19 Single_Earth_Station#6 Single_Earth_Station#13 Single_Earth_Station#20 Single_Earth_Station#7 Single_Earth_Station#14 Figure 1: Top-level ALOHA system with 20 stations 2. RoundTripDelay: The satellite round-trip delay in seconds. SafeDistance: The minimum distance in seconds between two packets to avoid collision. determines the backoff time delay. SatelliteQueueSize: The maximum number of elements that can be held in each of the two queues used in the Satellite_Station module. PacketLengthInSecond: Time required transmitting a packet of length PacketLengthInBits. RandomizationParameter: A uniformly selected random number between one and this parameter. Inc. Parameters The ALOHA model is extensively parameterized. PacketLengthInBits: Length of the packet used in both ALOHA and Slotted ALOHA models. www. SlotSize: Size of the time slot used in the Slotted ALOHA model. This can be different than the RunLength parameter. EarthStationQueueSize: The maximum number of packets that can be held in the queue of the Single_Earth_Station module.MLDesign Technologies. AlohaType: This parameter has two possible values: Unslotted and Slotted. TrafficStopTime: Time to stop generating traffic in all the earth stations.mldesigner. MeanInterArrival: Mean time between two packets arriving at an earth station for transmission. It determines whether to execute the ALOHA or Slotted ALOHA protocol. multiplied by the PacketLengthInSecond parameter. System-level parameters are shown below. 2 .

Collision: Flag showing possible packet collision. Satellite_Station Module The Satellite_Station module is shown brlow. TimeTransmission: Time at which Source transmits or retransmits the packet. Data Structures The Aloha model uses two MLDesigner data structures: AlohaPacket and AlohaType. The primary function of the module is to detect collisions. TimeCreated: Time at which Source creates the packet. TimeFinished: Time at which the packet is delivered successfully. GlobalSeed: Seed used in generating random numbers. Length: Packet length in bits. data are not collected. ChannelSpeed: Data rate in bps for the satellite channel. 4.com Load: Combined traffic. WarmupTime: In this early period of the simulation.MLDesign Technologies. 3 . 4. www. RunLength: Simulation iteration length in seconds. RetransmissionCount: Number of times Source retransmits the packet until it is delivered successfully. 3. This is the time to reach the steady state. AlohaPacker has seven fields: • • • • • • • Source: Earth station originating the packet.mldesigner. it also includes both packet transmission delay and satellite round-trip delay. Modules in the Aloha_System_Nodes20 Model This section presents the functional description of the modules used in the Aloha_System_Nodes20 model. as the percentage of the satellite channel capacity. Inc.1. NumberEarthStations: Total number of Earth stations in the system. AlohaType configures the model to run as slotted or unslotted. generated in all earth stations.

M M M M Packet_Generator#1 SendMemory ReceiveMemory SafePacketsMemory CollisionPacketsMemory Transmit_Receive#1 Figure 3: Single earth station module The Packet_Generator module. www. Single_Earth_Station Module The Single_Earth_Station module shown in Figure5 represents a single earth station. generates packets of the AlohaPacket type with the interarrival time exponentially distributed.MLDesign Technologies. Inc. It implements both ALOHA and Slotted ALOHA protocols.2.mldesigner. shown in Figure6.com -SafeDistance Init#1 False E SatelliteTimer Local Memory (LastTransmissionTime) 1 2 3 SafeDistance 2 1 RestartTimer#1 ServiceTimer#1 Write Message#1 2 FLocal Memory (NewTransmissionTime) F< I==0 SimpleFIFO (Collision Backward Queue) 1 SimpleFIFO (Collision Forward Queue) 2 1 Write Message#2 Or Select TimeTransmission M SendMemory ActiveRead SendMemory PacketLengthInSecond 1 2 3 Insert Collision M ReceiveMemory Write ReceiveMemory RoundTripDelay >>>SATELLITE UPLINK TRAFFIC>>> <<<SATELLITE DOWNLINK TRAFFIC<<< Figure 2: Satellite station module 4. It consists of Packet_Generator and Transmit_Receive modules. 4 .

com PoissonPulseTrain_2_3#1 Create AlohaPacket Insert TNow in TimeCreated Insert Length PacketOut GenIntConst#1 Figure 4: Packet generator module The Transmit_Receive module. shown in Figure7.MLDesign Technologies. www. retransmit it] EIO T F 2 M ReceiveMemory ActiveRead ReceiveMemory EIO 1 F Collision#1 T This_Sender#1 M SafePacketsMemory Write SafePacketsMemory [Packet is delivered correctly] <<<SATELLITE DOWNLINK TRAFFIC<<< Insert TNow in TimeFinished Figure 5: Transmit receive module 5 . WriteMessage#1 Insert TNow in TimeTransmission M SendMemory EIO 1 2 PacketIn Insert Source FIFOWithReject#1 Aloha_Type#1 Unslutted Slotted Write SendMemory >>>SATELLITE UPLINK TRAFFIC>>> EarthStationID WaitForNextSlot#1 Retransmission Counter LocalMemory#1 Int_Num_Packet_Length_Delay#1 [Backoff Time] M CollisionPacketsMemory Write CollisionPacketsMemory 2 1 [Packet is in collision.mldesigner. Inc. en-queues the newly generated packets in a FIFO queue and transmits them one at a time whenever the station's previously sent packet is correctly delivered.

mldesigner. AlohaStatistics Module www.MLDesign Technologies. Sample Results Sample results from selected ALOHA simulation runs are shown below.com The AlohaStatistics module. Inc. M CollisionPacketsMemory CollisionPackets M SafePacketsMemory SatePackets Select Length 1. 6 . shown in Figure10.3. 4. computes statistics on the simulated data and displays the results in graphs.0 CollisionsVsLoadGraph ThroughputVsLoadGraph Select TimeFinished ScatterGraph2#1 Select TimeCreated HistogramGraph2#1 BatchStatisticsGraph2#1 BatchMeanGraph2#1 ThroughputAndDelayGraph#1 Select Length ThroughputVsTimeGraphTemp#1 Select RetransmissionCount HistogramGraph#1 RetransmissionCountVsLoadGraph Figure 6: Statistics module 5.

00 0.1) Figure 8: Retransmission count histogram for a 20 node slotted ALOHA simulation T h r o u g h p u t O v e r C a p a c i t y Throughput vs Time Graph 0.4) Set(2.4 0.2 1.10) Figure 9: Throughput vs Time for a 20 station unslotted 10-iteration simulation 7 .2 0.2 0.2 2.MLDesign Technologies.4 1.0 2.1) 1.8 3.8) Set(2.5) Set(2.8 1.0 0.0 D 0.0 x10 2 Figure 7: Delay scattergraph for a 20 node slotted ALOHA simulation RetransmissionCount Histogram Graph 20 18 16 S a m p l e s 14 12 10 8 6 4 2 0 0 5 10 15 20 25 RetransmissionCount 30 35 40 Set(1.2 2. www.4 0.com x10 2 Delay Scatter Graph Set(1.4 0.7) Set(2.15 0.0 1.1) Set(2.6 0.6 2.0 x10 2 Set(2.0 1.8 1.0 2.25 0.6 2.6 a y 0.8 e l 0.4 1.2) Set(2.6) Set(2.8 2.05 0.4 2.9) Set(2.6 0.8 2.10 0.2 1.3) Set(2.2 0.8 3. Inc.20 0.mldesigner.6 Time 1.4 2.2 1.6 Time 1.

mldesigner.MLDesign Technologies. 8 . Inc. www. Keyvan Farhangian of KVON Technologies.com Note: Model developed by Dr.

Sign up to vote on this title
UsefulNot useful