Sunday, December 29, 2013

TinyAPRS Packet Throughput Simulations

I spent some time investigating how the proposed TinyAPRS protocol would work and remembered Bob (WB4APR) wrote a BASIC program to simulate channel throughput in regard to the ALOHA concept. For the TinyAPRS protocol with Power Nodes, I would like to have a Net Cycle time of around 60 seconds. Since the node count is low (e.g. 5 nodes) this should be possible. Bob's simulation assumes each node randomly transmits. For regular APRS, this is NOT the case that I have seen. The packets occur regularly at some rate (e.g. 5min, 30 mins, etc) within +/- 1 second each time. The only exceptions are mobiles that use proportional beacon mode.

I used Bob's simulation and selected only 5 nodes (stations) and a period of around 10 seconds. I ran the simulation by using DOSBox and a QBASIC on my Windows 7 system. This is really cool since he wrote this stuff over 10+ years ago and there are tools like DOSBox that can bring them back to life.

With the random simulation all nodes achieved a Net Cycle Time of 45 seconds (I was looking for about 60 seconds- good!).


I was interested in how this would work out if the nodes did not transmit randomly, but repeated at a constant interval. I had each node transmit with a slightly different rate. I wrote this simulation using BASIC256 like my other simulation. With approximately the same period I got a 100% success in 30 seconds. I plotted the packets below. The RED dots are packets that collided and the WHITE ones did not collide. Bob's simulation is more fancy, he counts each nodes good packets, etc but mine is a good exercise.


My simulation does not stop when good packets from all nodes is achieved and you can see how the packets slip in to collisions and then out again.

I plan to implement TinyAPRS with a random transmit cycle, but most likely a regular cycle would work just as well with micro-controllers since even if you started them at the exact time they would slip in an out of sync. It will also be interesting to see the effects of digipeating which will add more traffic to the channel.

No comments:

Post a Comment