File: picoeff.m

package info (click to toggle)
ns2 2.35%2Bdfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 78,780 kB
  • ctags: 27,490
  • sloc: cpp: 172,923; tcl: 107,130; perl: 6,391; sh: 6,143; ansic: 5,846; makefile: 816; awk: 525; csh: 355
file content (18 lines) | stat: -rw-r--r-- 561 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function [a, b, sampling] = picoeff(N,R,C)
% This function gives the coefficients "a" and "b" of the PI 
% controller at sampling frequency  "sampling". N is the minimum 
% number of flows, R the maximum round trip delay and C the capacity 
% of the link in (average sized) packets/sec.
%function [a, b, sampling] = picoeff(N,R,C)
N = N*500;
C = C*500;
p_q = 1/R;
w_g = 2*N/R/R/C;
K = w_g*abs( (i*w_g/p_q+1)/((R*C)^3/(2*N)^2));
num = K*[1/w_g 1];
den = [1 0];
[numn,denn] = bilinear(num,den,100*w_g);
sampling = 100*w_g;
format long 
a = numn(1);
b = -numn(2);