# AVAILABLE BANDWIDTH CHANGE DETECTION

Λογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 4 χρόνια και 5 μήνες)

151 εμφανίσεις

AVAILABLE BANDWIDTH CHANGE DETECTION

Connie Logg and Les Cottrell, SLAC, May 2004.

The principle behind th
is algorithm is evolved from work by NLANR [1]. It
involves buffering the time
sequence ABwE data into two buffers: a history buffer
(
h
)

for base
-
lini
ng
, and when a datum meets
specific requirements, into a trigger buffer (
t
).
Each

buffer ha
s a
maximum

number of entries parameter

r敳e散瑩v敬y

d整敲m楮敳ehow汯ngth攠b慮dw楤thch慮g攠mus琠eis琠b敦or攠慮an慬ysisof楴sd慴愠楳
p敲form敤瑯s敥ifw攠h慶e敮捯un瑥t敤慮慬敲琠捯nd楴楯n

or敶ent
.乯瑥tth慴a

th攠䅂wd慴愠楳瑡ten
on捥愠minu瑥t

roughly
th攠numb敲of

m楮u瑥猠
(慳sumingnod慴愠楳汯s琩瑨慴a

.

Th攠h楳瑯rybuffer楳楮楴楡i楺敤慴as瑡t琠tpw楴h

d慴愠po楮瑳

h

is initialized, we enter the data processing loop. The mean (
m
h
) and standar
d deviation (
o
h
) of
h

are
then calculated.

Two other critical parameters besides the buffer lengths are used in the analysis and event detection:

The sensitivity
(

) is the number of standard deviations (
o
h
) beyond
m
h

that a datum must lie to be
considered

a trigger value. The default at this time is 2, however we are evaluating how to dynamically
set this as a function of
m
h

and
o
h
.

Threshold (

is the difference between the buffer means
m
h

and
m
t,

in units of standard deviations,
that must be exceeded

for an event to be detected. Once we are in an event detected state, this threshold
must again be met before another event is detected. We are in an event detected state when an event
has been detected and we have only seen trigger data.

Currently



-

of瑨敳攠p慲ame瑥tsbypre
-
eam楮ing瑨攠d慴愮

s敳e慳aw敬氠asdrops,fors業p汩捩lyw攠only

mus琠a

b攠sus瑡楮敤(

)b敦or攠楴i楳捯ns楤敲敤signif楣in琠dep敮d
sonhow汯ngth攠us敲睡w瑳愠drop瑯b攠
sus瑡tn敤b敦or攠sh攠⼠/攠isnot楦楥i.

Pseudo perl
[7]
code
1

for the detection algorithm

External parameters:



sensitivity (default = 2);


threshold (default 20%)


history buffer length (default = 600)



trigger buffer length (default = 60)

Code variables:

@y, y = list of & current bandwidth estimates

m
h,
o
h

= history buffer mean & standard deviation

m
t,
o
t

= trigger buffer mean & standard deviation

m
e,
o
e

= event buffer mean & standard deviation

@
h

history buffer, current length \$#
h

@
t

trigger buffer, current length \$#
t

fo
reach y (@y) {

if (y > (
m
h

-

o
h
)) {#
then NOT a trigger

a=0;

1

In perl: a variable name with an @prefix is an array; the scalar

function applied to an array gives the
length of the array; the shift function shifts the first value of the array off and returns it; push treats the
array as a stack and pushes the second argument onto the end of the array given in the first argument

if(
scalar(
h
)

>

)⁻

s桩f琨䁨)㭽;
rem
ove

oldest

m
e

=

0;

if (y > (
m
h

+

2

*

o
h
)) {#
outlie
r?

if(scalar(@
t
) >0){
a

= shift(@
t
); next;
}

}

if (
a

< 0 && abs(y
-

m
h
) /
m
h

< 0.1) {y =
-
y}

push(@
h
, y); #
push y into history buffer

if (y > 0) {

(
m
h
, o
h
)

= calcstats(@
h
);

#calcstats returns mean & stdev for

#positi
ve non
-
zero values in array

if (
scalar(
t
)>

0) {
a

= shift(@
t
);}

}

}

else {#trigger data

push (@
t
, y); #

if (
scalar(@
t
)

<

)⁻湥琻t
#
e
nough triggers?

(
m
t
, o
t
) = calcstats(@t);
#
yes
, so see if event

if (

(
m
h

-

m
t
) / (sqrt(
o
h
2

+ o
t
2
)/2) >

)⁻
⍥v敮t?

††

u湬敳s
(
m
e

=
= 0) {#

if((
m
e

-

m
t
) / (sqrt(
o
e
2

+ o
t
2
)/2) >=

)⁻

††††
m
e
= m
t
; o
e
= o
t
;

foreach
t

(@
t
) {push (@
h,t
);}

while (
scalar(
h
)

>

)⁻愽shif琨
@
h
);}

(
m
h
, o
h
) = calcstats(@
h
);

@
t
=(); #
empty trigger buffer

}

else {
a
= shift(@
t
);}

}

else {#
not in event state

m
e
= m
t
; o
e

= o
t
;

foreach
t

(@
t
) {push (@
h,t
);}

while (
scalar(@
h
)

>

{
a
=shift(@
h
);}

(
m
h
,

o
h
) = calcstats(@
h
);

@
t

= ();
#
empty trigger buffer

}

}

else {a=shift(@
t
);}

#
no event

}

}

References:

[1]
[
6
]

Automated Event Detection for Active Measurement Systems
, A. J. McGregor and H
-
W
. Braun,
Passive and Active Measurements 2001.
http://byerley.cs.waikato.ac.nz/~tonym/papers/event.pdf