Flow Control Efficiency Calculator {title: ""}, {title: "Efficiency [%]", viewWindowMode: "explicit", viewWindow: {max: 100}, viewWindow: {min: 0}}

Calculates the efficiency of stop-and-wait (W=1) and sliding-window (W>1) flow control algorithms for given link and traffic characteristics.

Algorithm

Stop-and-wait flow control is a specific case of sliding window when W=1. To choose stop-and-wait, simply select a window size of 1. For W > 1, sliding window is used.

frames

Link A to B

Mb/s
km
m/s

Link B to A

Mb/s
km
m/s

Processing at A

us
us

Processing at B

us
us

DATA frame

Bytes
Bytes
Bytes

ACK Frame

Bytes

Other

Note that the time units are only applied in the results. The time units used above for the input parameters are fixed, e.g. you must give the processing delays in microseconds (us).

Plot

Results are calculated for the above parameter values. Optionally, you can also generate a plot that shows the efficiency for a range of values of one selected parameter. Select that parameter below, and its maximum value in the range. The minimum value will be taken from the value specified above. For example, if above you chose a window size of 1, and then below you select the Max window size parameter, and set the Max value to 10, then a plot for flow control efficiency with window ranging from 1 to 10 will be produced.



= $total_delay) { $efficiency=100*(($traffic_payload * 8) / ($linkab_datarate*1000000) * $system_timemultiplier) / ($data_trans + ($proca_before / 1000000 * $system_timemultiplier)); $throughput=$efficiency * $linkab_datarate * 1000000 / 100; } else { $throughput=($window_max * $traffic_payload * 8) / ($total_delay / $system_timemultiplier); $efficiency=100*$throughput / ($linkab_datarate*1000000); } return $efficiency; } $data_trans=($traffic_header + $traffic_payload + $traffic_trailer) * 8 / ($linkab_datarate*1000000) * $system_timemultiplier; $linkab_prop=($linkab_distance * 1000) / $linkab_speed * $system_timemultiplier; $ack_trans=($traffic_ack) * 8 / ($linkba_datarate*1000000) * $system_timemultiplier; $linkba_prop=($linkba_distance * 1000) / $linkba_speed * $system_timemultiplier; $other_delay=($proca_before + $proca_after + $procb_after + $procb_before) / 1000000 *$system_timemultiplier; $total_delay=$data_trans + $linkab_prop + $ack_trans + $linkba_prop + $other_delay; if ($window_max * ($proca_before / 1000000 * $system_timemultiplier + $data_trans) >= $total_delay) { $efficiency=100*(($traffic_payload * 8) / ($linkab_datarate*1000000) * $system_timemultiplier) / ($data_trans + ($proca_before / 1000000 * $system_timemultiplier)); $throughput=$efficiency * $linkab_datarate * 1000000 / 100; } else { $throughput=($window_max * $traffic_payload * 8) / ($total_delay / $system_timemultiplier); $efficiency=100*$throughput / ($linkab_datarate*1000000); } ?>

Results







b/s
%

$plot_value1) { $min_value=$plot_value1; $max_value=$init_value; } else { $min_value=$init_value; $max_value=$plot_value1; } $j=0; for ($i=$min_value; $i<=$max_value+($max_value-$min_value)/$plot_steps; $i=$i+($max_value-$min_value)/$plot_steps) { $x[$j]=round($i,0); $y[$j]=calculateEfficiency($linkab_datarate, $linkab_distance, $linkab_speed, $linkab_datarate, $linkab_distance, $linkab_speed, $proca_before, $proca_after, $procb_before, $procb_after, $traffic_header, $traffic_payload, $traffic_trailer, $traffic_ack, round($i,0), $system_timemultiplier); $j++; } } if ($plot_parameter1=="link_datarate_2") { $htitle1="Link Data Rate [Mb/s]"; $init_value=$linkab_datarate; if ($init_value > $plot_value1) { $min_value=$plot_value1; $max_value=$init_value; } else { $min_value=$init_value; $max_value=$plot_value1; } $j=0; for ($i=$min_value; $i<=$max_value+($max_value-$min_value)/$plot_steps; $i=$i+($max_value-$min_value)/$plot_steps) { $x[$j]=$i; $y[$j]=calculateEfficiency($i, $linkab_distance, $linkab_speed, $i, $linkab_distance, $linkab_speed, $proca_before, $proca_after, $procb_before, $procb_after, $traffic_header, $traffic_payload, $traffic_trailer, $traffic_ack, $window_max, $system_timemultiplier); $j++; } } if ($plot_parameter1=="link_distance_2") { $htitle1="Link Distance [km]"; $init_value=$linkab_distance; if ($init_value > $plot_value1) { $min_value=$plot_value1; $max_value=$init_value; } else { $min_value=$init_value; $max_value=$plot_value1; } $j=0; for ($i=$min_value; $i<=$max_value+($max_value-$min_value)/$plot_steps; $i=$i+($max_value-$min_value)/$plot_steps) { $x[$j]=$i; $y[$j]=calculateEfficiency($linkab_datarate, $i, $linkab_speed, $linkab_datarate, $i, $linkab_speed, $proca_before, $proca_after, $procb_before, $procb_after, $traffic_header, $traffic_payload, $traffic_trailer, $traffic_ack, $window_max, $system_timemultiplier); $j++; } } if ($plot_parameter1=="traffic_header_2") { $htitle1="DATA Header [Bytes]"; $init_value=$traffic_header; if ($init_value > $plot_value1) { $min_value=$plot_value1; $max_value=$init_value; } else { $min_value=$init_value; $max_value=$plot_value1; } $j=0; for ($i=$min_value; $i<=$max_value+($max_value-$min_value)/$plot_steps; $i=$i+($max_value-$min_value)/$plot_steps) { $x[$j]=$i; $y[$j]=calculateEfficiency($linkab_datarate, $linkab_distance, $linkab_speed, $linkab_datarate, $linkab_distance, $linkab_speed, $proca_before, $proca_after, $procb_before, $procb_after, $i, $traffic_payload, $traffic_trailer, $window_max, $traffic_ack, $system_timemultiplier); $j++; } } if ($plot_parameter1=="traffic_payload_2") { $htitle1="DATA Payload [Bytes]"; $init_value=$traffic_payload; if ($init_value > $plot_value1) { $min_value=$plot_value1; $max_value=$init_value; } else { $min_value=$init_value; $max_value=$plot_value1; } $j=0; for ($i=$min_value; $i<=$max_value+($max_value-$min_value)/$plot_steps; $i=$i+($max_value-$min_value)/$plot_steps) { $x[$j]=$i; $y[$j]=calculateEfficiency($linkab_datarate, $linkab_distance, $linkab_speed, $linkab_datarate, $linkab_distance, $linkab_speed, $proca_before, $proca_after, $procb_before, $procb_after, $traffic_header, $i, $traffic_trailer, $traffic_ack, $window_max, $system_timemultiplier); $j++; } } if ($plot_parameter1=="traffic_ack_2") { $htitle1="ACK Header [Bytes]"; $init_value=$traffic_ack; if ($init_value > $plot_value1) { $min_value=$plot_value1; $max_value=$init_value; } else { $min_value=$init_value; $max_value=$plot_value1; } $j=0; for ($i=$min_value; $i<=$max_value+($max_value-$min_value)/$plot_steps; $i=$i+($max_value-$min_value)/$plot_steps) { $x[$j]=$i; $y[$j]=calculateEfficiency($linkab_datarate, $linkab_distance, $linkab_speed, $linkab_datarate, $linkab_distance, $linkab_speed, $proca_before, $proca_after, $procb_before, $procb_after, $traffic_header, $traffic_payload, $traffic_trailer, $i, $window_max, $system_timemultiplier); $j++; } } } ?>