slotted aloha matlab code
#1

Hi Dear,
i am saifur rahman,i i would like to get details on slotted aloha matlab code if possible successful interference cancellation frame slotted aloha code also.My one cousin 'maizan' told me that slotted aloha code will be availablr here and now i am living at Malaysia and i last studied in 'The institute of engineers,Bangladesh'and now am doing Master in engineering by research in 'SEGI University'.For my further study i am interested to work related 'vehicular ad-hoc network-VANET'.That's why i need help on about this topic.
Reply
#2
%SIMULATION PARAMETERS
%simulation for slotted Aloha protocol
%total simulation time in seconds
runtime=0.2;
%total number of stations
nstation=10;
%transmission throughput of the media in bits per second
netthrou=10e6;
%frame size in bits
fsize=8000;
%avarage frame arrival rate per second for each station
%frate=10;
for frate=1:5:150
%average frame arrival rate per simulation iteration
trh=frate/10000;
%random wait window
wwind=100;
%EVENTS VARIABLES
%transmit active
tr=zeros(1,nstation);
%transmit queue
tq=zeros(1,nstation);
%transmit progress counter
tcnt=zeros(1,nstation);
%collision keeper
colis=zeros(1,10000*runtime);
%collision station index
colin=zeros(1,nstation);
%random wait after collision
rwait=zeros(1,nstation);
%transmit keeper
trkeep=zeros(nstation,10000*runtime);
%packet arrival keeper
pakeep=0;
for i=1:10000*runtime
for j=1:nstation
%check if the transmitter is active
if tr(j)==1
trkeep(j,i)=1;
end
%check if the packet has been sent
if tcnt(j)>0
tcnt(j)=tcnt(j)-1;
if tcnt(j)==0
tr(j)=0;
%check if the transmission is collision free
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 & mod(i,8)==0
tr(j)=1;
tcnt(j)=ceil(fsize/netthrou*10000);
tq(j)=tq(j)-1;
end
end
%check if a new packet has arrived
pa=rand(1,1);
if pa<trh
pakeep=pakeep+1;
%if the transmit is ready
if tr(j)==0 & rwait(j)==0 & mod(i,8)==0
tr(j)=1;
tcnt(j)=ceil(fsize/netthrou*10000);
else
tq(j)=tq(j)+1;
end
end
%decreaserandom waiting count
if rwait(j)>0
rwait(j)=rwait(j)-1;
end
end
%check for collision
if sum(tr)>1
colis(i)=1;
for k=1:nstation
if tr(k)==1
colin(k)=1;
end
end
end
end
px2(frate)=(pakeep-sum(tq));
py2(frate)=pakeep;
end
g2=[0:0.01:1.2];
s2=g2.*exp(-g2);
figure(2)
plot(px2*8000/runtime,py2*8000/runtime,'x',s2*1e7,g2*1e7,'-')
grid
xlabel('Throughput (bps)')
ylabel('Arrival Rate (bps)')
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: slotted aloha protocol coding in matlab, program for slotted alloha in matlab, slotted aloha dengan matlabdownload, slotted aloha using matlab in ccn, 10000, program code for aloha using matlab, dremel 8000,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  matlab code 1 3,449 31-01-2019, 02:52 PM
Last Post: [email protected]
  underwater optical communication matlab code 0 3,291 02-11-2018, 07:32 PM
Last Post: Guest
  source code for blood group detection in matlab 0 6,431 22-10-2018, 10:59 AM
Last Post: Guest
  hackchina matlab code 0 629 27-09-2018, 10:45 PM
Last Post: Guest
  heart disease prediction system source code for matlab 0 768 27-09-2018, 04:40 PM
Last Post: Guest
  matlab code for echo hiding 1 787 17-08-2018, 07:35 PM
Last Post: Guest
  matlab code for echo hiding 1 716 17-08-2018, 07:34 PM
Last Post: Guest
  download source code of zrp in matlab 0 736 14-08-2018, 02:48 PM
Last Post: Guest
  air compressor using crank and slotted link mechanism pdf 1 824 08-08-2018, 04:00 PM
Last Post: Guest
  matlab source code for anomaly detection 0 610 01-08-2018, 08:00 PM
Last Post: Guest

Forum Jump: