Skip to main content
. 2012 Jul 30;12(8):10196–10207. doi: 10.3390/s120810196
Algorithm 1. A pseudo-code description of BBS cleaning algorithm.

Algorithm BBS

Require: Tags = set of all observed tag Ids
    TS = the trainings set, the upper limit of |TS| is 2m+1
for (tag in Tags) do
while (GetNextEpoch()) do
  pi=0
  if ( pi!=0) then
   piSmoothing(w0, w1, n) // Equation 4
   KCurrentSlope (TS) // Equation 5
   if (pi>pc && K>0 && pi-1==0) then
   // check whether it is necessary to switch on ROFM or not
    t0=ti
    GetEpoch(ti+T)
    while (tit0 ‖ (ti<t0 && pi==0 && Readrate(K, B, pia, tia, ti)>0)) do
     if (pi==0) then
      piReadrate(K, B, pia, tia, ti)  // Equation 3
     end if
    end while
    GetEpoch(t0+T)
   end if
  else if (pi-1!=0) then
   KCurrentSlope (TS) // Equation 5
   piReadrate(K, B, pia, tia, ti)  // Equation 3
  else if (pi-1==0) then
   piReadrate(K, B, pia, tia, ti)  // Equation 3
  end if
end while
end for