Skip to main content
. 2019 Dec 9;19(24):5418. doi: 10.3390/s19245418
Algorithm 2 The reader operation procedure.
 1: Initialize lp = 16 bits, M = Mmin, V = 0, R = 0, F = 0
 2: send the Query or QueryRep command
 3: if receive the RN16 from CRFID then
 4:   return an ACK with the same RN16 and lp and M
 5: end
 6: if receive the frame from CRFID
 7:   if the frame is correct then
 8:   V=V+lp; R=R+1
 9:   else F=F+1
10:  end
11:  if R=N or F=M+1 then
12:  compute G=V/Δt, where Δt is the transmission time of the current round
13:   if G>G(1+θ) and lp<lpmax then
14:     lp=lp+8
15:   else if G<G(1+θ) and lp>lpmin then
16:     lp=lp8
17:  end
18: end
19: compute the number of redundant frames M via Equation (7) for the next round
20: end