Free tool
Anti-collision simulator
Five hundred tags, one reader. Watch a Gen2 inventory round by round: pick Q and a session, then see which slots read, which collide and how long the lot takes.
Run an inventory
- Reader time
- Q now
- Rounds
- Tags read at least once
- Reads in total
- Reads per second
Slots so far
How many times each tag has been read
How it works
What you’re looking at
A reader can only hear one tag at a time. So Gen2 makes the tags take turns, without any of them knowing the others exist. The reader sends a Query with a number, Q. Every tag that’s listening picks a random slot between 0 and 2^Q − 1 and keeps quiet until the reader counts down to it. When it does, the tag sends a 16-bit random number. If the reader hears it cleanly, it echoes it back and the tag replies with its EPC. That’s one read: about 3.7 ms at the dense-reader rate. Two tags in the same slot talk over each other, the reader hears nothing it can use, and both wait for the next round. An empty slot costs about 0.4 ms for nothing.
Too few slots and everything collides. Too many and most of them are empty. Readers get round this with the Q algorithm: a collision nudges Q up, an empty nudges it down, and whenever the rounded value moves the reader restarts the round with the new Q. For 500 tags it settles around 9, which is 512 slots, and a bit more than a third of them read clean.
Sessions, and why one tag reads 40 times
Each tag has an inventoried flag, A or B. The reader asks for the A tags; a tag that’s read flips to B and stops answering. What happens next depends on the session the reader chose.
In S0 the flag lasts only while the tag is powered and resets the instant power drops. A reader that drops its carrier, even briefly, brings every tag back to A, so every tag answers every round. The simulator drops the carrier every round. Fifty tags on a pallet for ten seconds, and each one answers about forty times. Five hundred tags for ten seconds, and the average answers four times while a handful never get a word in. In S2 and S3 the flag holds while the tag is powered. The crowd thins every round, the weak tags at the back finally get a slot to themselves, and the whole lot is done in about two and a half seconds. S1 is in between: the flag lasts between half a second and five seconds, powered or not, and the simulator uses two.
S0 is the right choice when you want to see a tag again and again, say to track it moving. S2 is the right choice for counting a crowd once. A session set wrong is one of the usual reasons a reader seems to miss tags.
What it assumes
The slot times are the best case, worked out from the bits each exchange carries at the chosen reader mode: no retries, no link-timing slack, no reader software in the loop. Real readers come in slower: Impinj quotes 150+ tags a second for mode 244 where the simulator manages about 200. Change the numbers under “Slot times we assumed” if you have your own. The model is framed slotted ALOHA with the Q algorithm from Annex D of the Gen2 spec, one reader, every tag in range and well powered. The physics of whether a tag can be heard at all is the subject of Wake the tag.
Where the numbers come from
The protocol is EPC Gen2 v2 (ISO/IEC 18000-63). Reader modes, Tari and link frequencies are from the Impinj E910/E710/E510/E310 reader chip datasheet (v1.4, mode tables), the same list as the range calculator. The flag persistence times are from the spec’s table of tag flags, and the step size in the Q algorithm is ours: the spec’s Annex D suggests 0.1 to 0.5, smaller for large Q. Everything on screen is computed in your browser from the seed in the address, so the link you copy replays the run exactly.