# resilient codes to phase shift

I need to define an encoding to beacon IDs. The codes are going to be periodic but in the receiver side I can have phase shifts so I' wondering the best way to decode: - 8 bits code groups that represent the same ID:

Group1: 00000001, 00000010, 00000100 .....  10000000
Group2: 00000011, 00000110, ......11000000, 10000001
Group3: 00000101, 00001010, .............., 01000001
...


How can I verify that a code belongs to a group? maybe the Real Part of a 8 bit DFT? Is there a group/codes generator?

• isn't that very much a question of framing? – Marcus Müller Dec 12 '16 at 10:03
• and I'm not sure I'd describe something that is shifted by a whole symbol (i.e. one bit in your case) as phase shift. – Marcus Müller Dec 12 '16 at 11:09
• Your "Group" leader choice rule seems to be "have two 1, pick a number of zeros in between, including -1 (in which case you get a single 1), right? Or what did you have in mind? – Marcus Müller Dec 12 '16 at 11:39
• What do you mean by "in the receiver side I can have phase shifts?" Do you mean actual phase shifts or shifts in received symbol timing? The former can be addressed by using differential modulation if you have control over that, while the former could be mitigated by adding some framing to your protocol. – Jason R Jan 11 '17 at 12:42

Assuming these are really just sub-words that are common to all elements in a group, simply trying out all 8 possible (cyclic) bitshifts of the received sequence to see whether you can match any group representative (e.g. the first column in your GroupN table) would very likely be the most efficient approach – because 8 bit is really not that much, and bit shifts are very efficient on CPUs or on FPGAs (whatever you're using), and even more importantly (since "beacons" surely doesn't sound like high data throughput), the code is easy to understand, and premature optimization is the root of all evil.