Part 2: Understanding the EPC Gen 2 Protocol

By Mark Roberti

The second-generation UHF Electronic Product Code standard includes many enhancements on Gen 1. Part 2 of this special report explains the most significant improvements.

The second-generation air-interface protocol standard incorporates some of the best aspects of the air-interfaces used in the Gen 1 and ISO protocols, and adds some features borrowed from other communication systems, such as 802.11 Wi-Fi routers, to create reader-tag communications that are faster and more reliable (as well as better able to deal with noise in the environment, as described under the section on dense-reader mode in Part 1) than any existing RFID protocols.

Part 1 of this report looked at entirely new features that were incorporated in the Gen 2 protocol. We now turn to enhancements made to the Gen 1 protocols. As we said in part 1, RFID users need to be aware that readers do not have to support all the features and improvements built into the protocol. So even though the current crop of UHF readers can be upgraded with hardware and new firmware to enable them to read Gen 2 tags, they might not be able to take advantage of the enhancements described below.




Faster read rates


The Gen 2 protocol is designed to enable readers to read data from and write data to RFID tags much faster than the Gen 1 protocols. Gen 2 supports a tag-to-reader data transfer rate of up to 640 kilobits per second, versus up to 80 kilobits per second for Gen 1 Class 0 and 140 kilobits per second for Gen 1 Class 1. The faster rates mean companies don't have to slow down their operations in order for tags to be read. Furthermore, the Gen 2 protocol requires that tags write 16 bits in less than 20 milliseconds. Writing a 96-bit EPC, plus "overhead" (a few bits of additional information stored on the tag), should take less than 140 ms, allowing readers to program tags at rates exceeding 7 tags per second in the field, which mean manufacturers won't have to slow down their production line to write EPCs to tags.

"End users should expect, in a properly implemented system, to achieve tag read rates three to eight times faster than Gen 1," says Chris Diorio, cochair of EPCglobal’s Hardware Action Group (HAG), which developed the Gen 2 protocol, and founder and chairman of Impinj, a Seattle-based manufacturer of RFID equipment. "It will take time to get to that point, because reader manufacturers will have to optimize their systems to get the true benefits. But the capability is there."

William Colleran, president and CEO of Impinj, adds that the Gen 2 air interface uses the UHF spectrum more efficiently and that should improve system performance when there are many readers in facility. "There's a limited amount of spectrum allocated for UHF RFID," he says. "The ability to use it more efficiently means you can have more readers working effectively in an environment."

It's not clear how Gen 2 systems will perform in the real world, but Alien Technology's VP of corporate development, Tom Pounds, says for most applications, end users should expect a properly installed Gen 2 system to perform 50 percent faster than Gen 1 system in the United States and as much as 100 percent faster in Europe.

Fewer ghost reads


One problem early adopters have encountered with the Gen 1 Class 0 protocol is ghost reads. Sometimes the reader thinks it has read a tag with a particular ID when no tag with that ID is present. The RFID Alliance Lab, a nonprofit test center at the University of Kansas, confirmed that ghost reads are an issue. " We have data for 515,000 Class 0 read attempts in which we believe we found 677 ghost reads," says Daniel Deavours, the lab's research director. "This suggests a Class 0 ghost read rate of 1.3 per 1,000. Additional tests with 100,000 reads confirmed our findings."

Ghost reads can create problems for inventory systems, which might be updated with a case or pallet that doesn't really exist. Gen 2 uses a variety of techniques to greatly reduce the chances of having ghost reads. First, when a Gen 2 reader issues a query command, a tag must respond after a known delay, with an uncertainty that is only 4 millionths of a second long. If a tag responds outside of that tiny uncertainty window, the reader ignores the tag. If a valid tag does respond in that window, the reader-tag dialog beings. The tag first sends something called a preamble, a unique waveform that doesn't look like noise. If the reader sees and validates the preamble, it then looks for radio waves that will be translated into bits of data from the tag. The reader checks the bit stream to see if it is in a valid EPC format. If it is, the communication continues. If not, the reader can start communicating with a different tag in the field.




A Gen 2 tag is designed to tell a reader how many bits it is sending, so the reader compares how many bits it received versus how many bits a tag said it would send. If they match, the reader goes through a cyclic redundancy check (CRC), a 16-bit error check (which is also used by Gen 1 Class 1 systems to prevent ghost reads), to make sure the entire communication was received without being corrupted. If the tag passes these five checks, it's a valid tag. "True Gen 2 readers, implementing these checks properly, will have an astronomically low probability of ghost reads," says Diorio.

Select command


The Gen 1 Class 1 protocol enables the reader to identify some tags by matching bits of data. So if an EPC has a manufacturer code with 12345, and a retailer wanted to count all cases on a pallet from a particular manufacturer, it could instruct the reader to count all the cases with tags that have the manufacturer code 12345 in their EPC. This is designed to give end users a fast way to take inventory in the field.

The Gen 2 protocol offers a more flexible version of this feature. The Gen 2 reader can selects tags in the field before inventorying them by issuing a new command, called select. It can look for matching bits in the tag IDs, EPCs or in the user memory. So if pallets stacked with tagged cases are coming through a dock door, the reader could issue a select command to tags with an EPC that indicates they are pallet tags, and have only the pallet tags respond. Or the reader could select only case tags.

The Gen 2 reader can use several select commands for more complex operations. Suppose a retailer wants to identify all cartons of milk that have passed their expiration data. A reader could select all milk-carton tags by issuing the appropriate select command, targeting part of a tag’s EPC. It could then issue a second select command, asking for tags with an EPC that indicates that the milk is more than a week old.

"The reader acts on a match, so the best way to use it is to unselect everything you don't want to count and count what's left," says Steve Smith, Alien's founder and chief technology officer. "That way if a tag misses a select command, it’s not a problem."

But the command will be useful only if information on the tag, particularly EPCs, are standardized, says Roger Stewart, a EPCglobal Hardware Action Group (HAG) member and the chief technology officer at Intelleflex, a San Jose, Calif., manufacturer of long-range, battery-assisted RFID tags. "If we have a variety of different numbering schemes, as it now appears we will, then there will be no way to select all coffee products, or unselect all of something else."

The select command could be a powerful tool to enable end users to quickly identify items. Stewart believes that end users will experiment with it and, over time, develop strategies for standardizing certain bits on the tags so that select commands can be issued to the tags.




AB symmetry


With the Gen 1 protocols—and indeed most existing RFID protocols—the reader gets the ID number from the tag and then tells the tag to go to sleep, so the reader can read other tags' IDs without interference from the first tag. Occasionally, a tag might take a long time to wake up (say, if it had been attached to a case of frozen fish and put in a freezer and then, as the case is taken out of the freezer, a reader tries to read the tag), or a defective tag might go to sleep and never wake up.

The Gen 2 protocol doesn't use a sleep state or a quiet state. Instead, it uses two symmetrical states that are simply labeled A and B. Each tag has a label or "flag"—either A or B. So let's say there are 50 A tags in the field and 50 B tags. The reader will say, "I want to read only A tags." After it finishes counting an A tag, it changes the flag on that tag to B. The reader then reads all the B tags, setting each flag back to A as it counts the tag. The reader now knows that it has read 50 A tags and 100 B tags (the 50 As became 50 Bs). If it now reads 100 As, it knows it has read all the tags in the field and that there are 100 of them.

The benefit of AB symmetry is that it avoids the problem of putting tags to sleep and then struggling to wake them up. When combined with the "sessions" feature described in Part 1 of this special report, AB symmetry gives Gen 2 systems the flexibility to have more than one reader reading tags in a field. (A Gen 2 tag has four separate pairs of AB flags, one for each of its four sessions.)

Under Gen 1 protocols, one reader would read a tag and put it to sleep, then read other tags in the field. Having four separate sessions allows more than one reader to read the tags, and AB symmetry avoids the problem of having one reader put a tag to sleep and then having another reader wake it up and interfere with the counting of the first read.

Here's an analogy. Robert is counting cases in the back room, and he puts a blue sticker on each case he's counted (analogous to reading a tag and putting it to sleep), and then Sarah comes in and wants to count the cases for a different reason. She starts to remove the blue stickers on the case cases that she's counted them (i.e., she wakes up the tags). Now neither of them will be able to get an accurate count.

Now, let's say Bob puts a blue sticker on every case he's counted, then removes it and replaces it with a yellow sticker to confirm his count (that is, he changes the symmetry from A to B). Sarah comes in and puts an orange sticker on each case she's counted, and then she replaces it with a purple sticker. Now both of them can count without interfering with each other.

Longer passwords


The Gen 1 protocols have the ability to send kill commands to permanently deactivate a tag, as means of protecting consumer privacy. To prevent people from coming into stores and killing the tags, the original Class 1 protocol required the reader to send an 8-bit kill code to the tag before the tag would respond to the kill command by permanently going to sleep.

The problem with an 8-bit kill code is that 8 bits only encodes 256 unique numbers. Anyone with a handheld reader could issue 256 random numbers (ranging from zero to 255) to the tag until they eventually hit on the kill code. (The reason for such a short kill code is the designers of the protocol were trying to keep the integrated circuit needed to run the protocol as simple as possible to keep tag costs down.)

The Class 0 protocol used a 24-bit kill code, which is better but still didn’t offer adequate protection to the users. The end users wanted even more protection for tags because they hoped to use tags not only as item identifiers but also as antitheft devices. (RFID readers at store exits could read the tag, and a software system could check if the tag is on an item that has been paid for and, if it isn’t, sound an alarm.)




The new Gen 2 protocol features 32-bit passwords, which are used for the kill code as well as for locking and unlocking memory. That means there are more than 4 billion password options, which makes it tougher to crack and kill the tags without the tag owner's permission.

Conclusion


The Gen 2 protocol features significant improvements over Gen 1 and ISO UHF protocols, and these improvements will enable hardware manufacturers and system providers to develop equipment that performs better and with greater flexibility than existing systems. But one question is how much end users will have to pay for all the performance improvements and extra features in the Gen 2 protocol.

According to Alien Technology, a Gen 2 integrated circuit will have about 40,000 transistors, compared with just 12,000 for a Gen 1 Class 1 IC. That means that if the silicon chips for Gen 2 were made with the same fabrication processes used for Gen 1 tags, the Gen 2 chips would be nearly twice as large. (The chips would not be four times as large, says Alien's Smith, because the digital logic makes up only about 30 percent of the microchip. The rest is used for a charge pump, voltage regulator and other elements that don't shrink as easily as the digital logic.)

This means that if the silicon chips used in Gen 2 tags were made with the same fabrication process, Gen 2 tags would be more expensive than Gen 1 tags. To avoid that, companies will likely switch to more advanced silicon fabrication processes, which will allow them to shrink the Gen 2 IC to about 80 percent the size of a Gen 1 Class 1 chip. That doesn't mean that Gen 2 chips will be 20 percent cheaper than Gen 1 chips, because more advanced silicon fabrication techniques are more expensive, which offsets some of the benefits of shrinking the chip.

In the end, the first Gen 2 chips will likely be about the same cost as Gen 1 chips are today, which means the expected decline in tag prices will be delayed by a year. (Gen 1 tags would move to the more advanced silicon and be 20 percent or so cheaper by the end of 2005.) Those who worked on the protocol say there was little choice. "The end users asked us for a set of features that they wanted in the protocol, and it was the Hardware Action Group's job to deliver them," says Smith. "There is a cost, but that's what they wanted."