RFID EPC Gen2 Inventory Workbench

Step through Query, RN16, ACK, EPC, QueryRep, and session-flag behavior in an EPC Gen2 inventory round.

animation
rfid
epc-gen2
networking
short-range
interactive
Learner-ready EPC Gen2 inventory workbench showing reader commands, random tag slot choices, RN16 replies, ACK selection, EPC backscatter, QueryRep slot advance, Q tuning, and common RFID inventory caveats.
EPC Gen2 UHF RFID Inventory Anti-collision

See how a reader turns a crowd of passive tags into one EPC at a time.

EPC Gen2 inventory starts with a reader Query, lets tags choose random slots, listens for an RN16 reply, ACKs one tag, receives its EPC, and then advances the frame with QueryRep. Use the controls to see why Q, RF reliability, and session flags matter.

0/12 Tags inventoried in this session
Round 1 Inventory frame currently being explored
Q=4 Frame size is 16 slots
Slot 0 Active reader opportunity
Query Current protocol moment

What is being inventoried?

A passive UHF RFID reader powers nearby tags and asks the matching tags to identify themselves. Each successful tag sends an EPC value, usually shown as the item identifier.

Why not ask all tags at once?

If several tags backscatter at the same time, their replies overlap. EPC Gen2 uses random slots so the reader can find empty slots, collisions, and single-tag replies.

What should you try first?

Press Step and watch one slot. Then change Q: too small gives collisions; too large wastes time in empty slots; near the active tag population is usually better.

1. QueryReader starts a frame
2. ChooseTags choose slots
3. RN16Slot-zero tag replies
4. ACK/EPCReader selects one tag
5. QueryRepReader advances slot
Reader

Start with a Query.

The reader selects the session and target, announces Q, and creates a frame of slots. Matching tags pick a random slot counter.

Query Reader sets session, target, and Q. Q=4
Slot choice Tags load counters from 0 to 2^Q - 1. 12 tags
RN16 Only tags whose counter is zero should reply. waiting
ACK + EPC Reader ACKs one RN16, then receives PC/EPC/CRC. none
QueryRep Remaining tags decrement slot counters. slot 0

Current frame slots

Step through each reader opportunity. Green means one EPC read, red means collision, grey means empty.

Diagnosis: first frame ready

Step through the first few slots before changing Q. Early empty or collision outcomes are normal in a random frame.

0 Successful EPC reads this round
0 Collision slots seen
0 Empty slots seen
12 Tags still active in the session

Reader event log

Command Quick Reference

  • Query: starts or restarts an inventory round with a selected session, target, and Q.
  • ACK: echoes the RN16 from one successfully decoded tag.
  • QueryRep: advances to the next slot by decrementing counters in participating tags.

Tag Reply Quick Reference

  • RN16: a temporary 16-bit random number used for the reader to address one reply.
  • PC/EPC/CRC: the identified tag returns protocol-control bits, EPC data, and a CRC after ACK.
  • Inventoried flag: a successful tag changes flag state and becomes quiet for that session/target.

Q Tuning Quick Reference

  • Frame size: slots = 2^Q.
  • Too small: many collisions; increase Q.
  • Too large: many empty slots; decrease Q or accept slower inventory.
Guided practice
  1. Use Balanced shelf and press Step event until one EPC is read. Name each command in order.
  2. Switch to Frame too small. Count collisions after half the frame. Explain why Q should increase.
  3. Switch to Frame too large. Count empty slots. Explain why a large frame can slow inventory even when it avoids collisions.
  4. Use Weak RF edge. Find a slot with only one tag but no EPC read, and separate RF loss from anti-collision logic.
Technical accuracy notes
This is a teaching model

The workbench shows the inventory sequence and main outcomes. It does not model every Gen2 timing field, modulation option, command bit, memory bank, or vendor Q algorithm.

Q is not a tag count

Q chooses a frame size. A good Q is related to the active population, but a reader observes only empty, collision, loss, and successful slots.

Collision evidence is limited

A collision tells the reader that more than one signal overlapped. It does not reveal the exact number of colliding tags in that slot.

ACK selects an RN16

After a clean RN16, the reader ACKs that value. The tag then backscatters protocol-control bits, EPC bits, and a CRC in the simplified sequence shown here.

Session flags silence tags

A successfully inventoried tag changes its inventoried flag for the selected session/target. It is not permanently silent; persistence depends on the session behavior.

Throughput has a ceiling

Ideal slotted ALOHA peaks near 1/e successful replies per slot when the offered load is near one. Practical read rate also depends on command timings and RF conditions.

Primary source links

Use these sources when checking terminology, command sequence, and standard boundaries.

Companion modules