【计算机网络】【MATLAB绘图】ALOHA协议的吞吐量(Throughput of ALOHA Protocol)【新加坡南洋理工大学 NTU SG】

时间:2024-04-16 07:15:39

Precursors of CSMA/CD

ALOHA (Pure ALOHA, Slotted ALOHA)
F: frame transmission time (assume constant)
S: throughput (average # of successful frame transmissions per F)
G: offer load (average total # of transmission attempts (including retransmission) per F)

Pure ALOHA Throughput

在这里插入图片描述

Slotted ALOHA Throughput

在这里插入图片描述

MATLAB Simulation of throughputs of Pure and Slotted ALOHA

g = 0 : 0.0001 : 2;
S1 = g .* exp(-2 * g);  % Pure ALOHA
S2 = g .* exp(-g);  % Slotted ALOHA
figure;
plot(g, S1);
hold on
plot(g, S2);
title("Throughput of Pure and Slotted ALOHA");
xlabel("average total transmissions");
ylabel("throughput");
grid on

Program output:

在这里插入图片描述