Smith's innovation was dubbed "the Q algorithm" for "Query with a parameter Q."
Gen 2 tags have the ability to generate random numbers. The
reader will tell the tags the range in which it should generate a random number by issuing a query command with a Q value ranging from 0 to 15. If it often gets back no response to its queries, it will automatically decrease the Q value. If it gets more than one tag responding, it will increase the Q value, thereby increasing the range of numbers that can be generated by the tags.
The reader might issue a query with a parameter of Q=4. The tags generate two random numbers, the first one ranging from zero and 65,535, and the second ranging from zero and 2 to the power of Q, minus 1. If Q is four, then 2 to the fourth power is 16, minus 1 equals 15. So all tags choose a second random number ranging from zero and 15.
The reader asks any
tag that chose zero for their second random number to respond. If one tag has zero, then it responds with the first random number, between zero and 65,535, and the reader acknowledges it. Since the tag has now been singulated, the reader could simply count the tag as present ("I know a tag with a random number of 45,101 is in the field"). It could write an
EPC to the tag, if it doesn't have one, or it could ask tag 45,101 for its EPC if it does have one. It then asks the remaining tags to subtract one from their second random number and singulates the next tag that has a zero, and it keeps doing that until all the tags are singulated.
If no tags choose zero for their first random number, then the reader asks all the tags to decrement their random number by one, and it keeps doing that until a tag with zero responds. If two tags respond, the reader can't read either tag, so it issues a negative acknowledge, which tells the tags to wait for another query until they respond again. "This
protocol makes it extremely unlikely that a reader will singulate two tags when it meant to only talk to one," says Diorio.
Sessions
One weakness of the Gen1 protocols was the possibility that one reader would interfere with another reader's ongoing counting of a group of tags. So let's say a
fixed reader is counting all the tagged items on a shelf. It reads a tag and commands it to go to sleep so it can read the next tag. When it is halfway through 100 items, someone comes along with a handheld reader, looking for a specific item on that shelf. The handheld commands all the tags to wake up and respond. Now the fixed reader has to start the counting all over again.
To avoid this problem, the Gen 2 protocol introduces something called sessions. Each tag will be able to operate within four separate sessions. A retailer or manufacturer could set up their system so that all fixed readers read tags in session 1, and all handhelds use session 2. So if the fixed reader puts the tags to sleep in session 1, the handheld reader could communicate with the tags in session 2 and not interfere with the ongoing count by the fixed reader in session 1.
"Sessions is a very important features that gives end users the ability to avoid having readers interfere with each other's operation," says Roger Stewart, a member of the
EPCglobal HAG and the chief technology officer at
Intelleflex, a San Jose, Calif., manufacturer of long-range, battery-assisted
RFID tags.
At this point, it's not clear how the readers will determine which session to use. End users will likely assign different session to different types of readers. For instance, a company might have dock door readers use session one, forklift readers use session two and handhelds use session three.
These are some of the major new features in the Gen 2 protocol. They were driven by the needs of early adopters of EPC technologies and they will enable systems to perform better and give companies more flexibility in how they use EPC systems. Next week, we'll look at some of the features of the Gen 1 protocols that have been enhanced in Gen 2.