Anti-Collision (LFSR / Slot Counter) | How RFID Works

Tag · protocol engine Chapter 16 of 21

Anti-Collision (LFSR / Slot Counter)

How dozens of tags share the air without talking over each other

Animated diagram of the Anti-Collision (LFSR / Slot Counter): How dozens of tags share the air without talking over each other

What it is physically

A 16-bit linear feedback shift register (LFSR) on the tag die — roughly 50 flip-flops and a few XOR gates. Combined with a down-counter register that tracks the tag's current slot number. Total silicon area is negligible compared to the rest of the digital logic.

The LFSR is seeded from a combination of the tag's TID (factory-unique) and thermal noise from a small on-die circuit, so each tag's random sequence is different even if they power up at the same instant.

What it does

Implements Slotted ALOHA anti-collision. When the reader sends a Query command with parameter Q, the tag:

  • Generates a random number R from the LFSR
  • Sets its slot counter to R mod 2Q (so 0 to 2Q−1)
  • If counter = 0, responds immediately with a 16-bit random number (RN16)
  • If counter > 0, stays silent and waits
  • On each QueryRep, decrements the counter by 1. Responds when it hits 0.

The full inventory round

The complete handshake for identifying one tag:

  • Reader → Tag: Query(Q=2) — start a round with 4 slots
  • Tag → Reader: RN16 — 16-bit random nonce (only if slot counter = 0)
  • Reader → Tag: ACK(RN16) — echoes the nonce back to confirm
  • Tag → Reader: EPC + PC + CRC-16 — the tag's full identity
  • Reader → Tag: QueryRep — advance to next slot, repeat

The RN16 handshake prevents a tag from sending its full EPC into a collision — the short nonce is cheaper to lose.

Why it matters

  • Without anti-collision, two tags responding simultaneously produce garbled data — the reader can't decode either one
  • Q is adaptive: reader starts with a guess (e.g. Q=4 for ~16 expected tags), increases Q if too many collisions, decreases if too many empty slots
  • Theoretical throughput: ~36.8% of slots produce a clean read (1/e, the Poisson limit of slotted ALOHA)
  • In practice, a good reader inventories ~400-1000 tags per second

Typical parameter values

  • Q range: 0 to 15 (1 to 32768 slots)
  • Q=0: 1 slot — use when you know there's exactly 1 tag (fastest)
  • Q=4: 16 slots — good default for ~10-20 tags
  • RN16 length: 16 bits — collision probability on nonce alone is 1/65536
  • Slot duration: ~3-5 ms depending on data rate and EPC length

Design tradeoffs

  • Q too low: many collisions, wasted time re-reading. But each round is short.
  • Q too high: many empty slots, wasted time listening to silence. But few collisions.
  • Optimal Q ≈ log2(N) where N is the number of tags. Reader adapts dynamically.
  • The LFSR must be unpredictable enough that two tags from the same batch don't pick correlated slots — manufacturing variation in the seed source matters.

Signal flow

Input: Decoded Query command with Q parameter, and QueryRep commands from the envelope detector → state machine. Also the LFSR's internal state (pseudo-random).

Output: A go/no-go signal to the response logic. When the slot counter reaches 0, the state machine transitions to the Reply state and begins clocking out the RN16 (and later the EPC after ACK) through the FM0 encoder to the backscatter modulator.