syedshan
Advanced Member level 1
- Joined
- Feb 27, 2012
- Messages
- 463
- Helped
- 27
- Reputation
- 54
- Reaction score
- 26
- Trophy points
- 1,308
- Location
- Jeonju, South Korea
- Activity points
- 5,134
Hi all,
I am trying to make a simulator for asynchronous (wireless) communication. The packet arrival time is exponentially distributed.
The method below is working fine if I am using following assumptions that (See Frame_length variable and then the bolded query in the end)
Where Frame_length is the transmission lenght of the frame.
Is this method correct?
When I am using Frame_length = 0.1 seconds, the results are not correct, i.e. I am not receiving the required number of frames per second...
I am trying to make a simulator for asynchronous (wireless) communication. The packet arrival time is exponentially distributed.
The method below is working fine if I am using following assumptions that (See Frame_length variable and then the bolded query in the end)
Code:
% (using Matlab)
time_sampling = 1e6; % 1 sec = 1e6 samples
Frame_length = 0.1e-3; % 0.1 ms
Flength = Frame_length*iter_sampling;
frame_rate = 50; % 50 frames per second
fr_discrete = frame_rate/time_sampling
for ii = 1:run_time * iter
...
...
pa = rand(1,1)
if(pa < fr_discrete)
% Initiate frame transfer following exponential distribution
end %if end
end
Where Frame_length is the transmission lenght of the frame.
Is this method correct?
When I am using Frame_length = 0.1 seconds, the results are not correct, i.e. I am not receiving the required number of frames per second...