FM0 Decoder / Bit Recovery | How RFID Works

Reader · receive Chapter 21 of 21

FM0 Decoder / Bit Recovery

Recovering the EPC bits from the noisy baseband signal

Animated diagram of the FM0 Decoder / Bit Recovery: Recovering the EPC bits from the noisy baseband signal

What it is physically

Digital signal processing in the reader's FPGA or DSP. The Impinj R420 uses a Xilinx FPGA that runs the demodulator in real-time. The steps are: matched filter for preamble detection → clock recovery → bit-period sampling → FM0 decode → CRC check. All of this happens in ~100 µs per tag response.

Some readers implement this in software on a host CPU via the sllurp library (Python), but for high tag rates (>100 tags/s) hardware acceleration is essential.

What it does — step by step

  1. Preamble detection: A correlator slides along the baseband signal looking for the FM0 preamble pattern (a specific sequence including a "violation" — a missing boundary transition that doesn't occur in normal FM0 data). This marks the start of the packet.
  2. Clock recovery: The transitions in the preamble and early data establish the bit period (1/BLF). A PLL or early-late gate tracker locks onto the transition timing, even though the tag's oscillator drifts.
  3. Bit sampling: At each bit boundary and mid-bit point, sample the signal level. A transition at the boundary is guaranteed; check for a transition at mid-bit.
  4. FM0 decode: Mid-bit transition → data '0'. No mid-bit transition → data '1'. Accumulate bits.
  5. CRC-16 check: The last 16 bits of the packet are a CRC-16/CCITT. Verify against the received data. If it fails → discard (bit error).

The preamble — how to find the start

The FM0 preamble is specifically designed to be unique — it contains a "violation" of the FM0 encoding rule (a boundary WITHOUT a transition). This cannot occur in normal data, so finding it unambiguously marks the start of a packet:

  • Preamble: 1,0,1,0,1,1,v where 'v' is the violation
  • The correlator looks for this exact pattern in the magnitude of the baseband signal
  • False alarm probability is very low because the violation pattern cannot occur in data
  • Once found, the bit clock is established from the known transition spacing in the preamble

Noise and errors

  • BER target: < 10−4 (fewer than 1 error per 10,000 bits). For a 128-bit packet, this means ~1.3% packet error rate.
  • Noise sources: thermal noise, TX leakage, environmental reflections, other tags' collisions, reader self-interference from frequency hopping
  • Clock drift: The tag's ring oscillator drifts ±10–20% with temperature and voltage. The reader's clock recovery must track this drift across the ~100 µs packet.
  • Near-far problem: A close tag with strong backscatter can drown out a distant tag. The reader uses power control and session flags to manage this.
  • CRC catches errors: If any bit is wrong, the CRC-16 will (almost certainly) fail, and the packet is discarded. The reader retries in the next round.

Packet structure (what comes after the preamble)

  • RN16 response: Preamble + 16-bit random number (32 symbols total)
  • EPC response: Preamble + PC (16 bits, protocol control) + EPC (96 bits typically) + CRC-16 (16 bits) = 144 data bits
  • At BLF=250 kHz with FM0: 144 bits takes ~576 µs
  • The reader must decode all of this correctly to identify the tag

How it connects to the output

Once the EPC bits are recovered and CRC-verified, the reader's host interface reports:

  • EPC: The tag's identity (e.g., "E200 3412 7856 0000 0000 0000")
  • RSSI: Received signal strength (from √(I²+Q²))
  • Phase: arctan2(Q,I) averaged over the packet (from page 20)
  • Timestamp: When this read occurred
  • Antenna port: Which reader antenna saw this tag
  • Channel: Which frequency channel (902–928 MHz)

For a differential (two-IC) sensor tag, host software matches reads by EPC to tell IC A from IC B, then computes Δφ.

Signal flow

Input: Digitized I(t) and Q(t) baseband samples. Contains FM0-modulated backscatter from the tag, buried in TX leakage and environmental noise.

Processing: Preamble correlation → clock recovery → bit-by-bit FM0 decode → accumulate into packet → CRC-16 verify.

Output: Verified EPC + metadata (RSSI, phase, timestamp, channel). Delivered to host via LLRP (Low Level Reader Protocol). A failed CRC produces nothing — the tag must be re-inventoried in the next round.