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?

  • $\begingroup$ isn't that very much a question of framing? $\endgroup$ – Marcus Müller Dec 12 '16 at 10:03
  • $\begingroup$ 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. $\endgroup$ – Marcus Müller Dec 12 '16 at 11:09
  • $\begingroup$ 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? $\endgroup$ – Marcus Müller Dec 12 '16 at 11:39
  • $\begingroup$ 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. $\endgroup$ – Jason R Jan 11 '17 at 12:42

How can I verify that a code belongs to a group?

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.

| improve this answer | |
  • $\begingroup$ Agree with you that is possible the most efficient method. I was testing with FFT to find out the meaning of group membership and of course they all share the same module part of the transform. $\endgroup$ – Guido Dec 12 '16 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.