LFSR/PRBS

Linear feedback shift registers (LFSRs), or their software implementations, are used to generate pseudo-random binary sequences (PRBS, also referred to as pseudo-random bit sequences) which are largely used in telecommunication (data scrambling, sync and/or test patterns, field delimiter markers, jamming, stream ciphers, bit-error rate tests, ...).
The feedback is formed by XORing or XNORing the outputs of selected stages of the shift register - referred to as taps - and then inputting this to the least significant bit (stage 0). The list of the taps is known as the tap sequence. It is this feedback that causes the register to loop through repetitive sequences of pseudo-random  value.
LFSRs are described by their characteristic polynomial: for example a tap sequence of [4, 3, 0] (the 0 corresponds to the x0 = 1 and can be omitted) describes the  polynomial x^4+x^3+1 (a 4-bit shift-register):

Last update:  4th May, 2021

Below a table of the polynomials  you may find in this blog is shown along with the systems where they are employed; the LFSR polynomials used in STANAG, MIL-STD, and FED standards are not listed.


polynomial referring post (used as)
x^31+x^3+1 KW-46 encryption (sync)
x^11+x^9+1CIS 81-81 T-206 (scrambler?)
x^9+x^5+1100-50Bd/500 FSK-2 (sync/test pattern)
CIS-12 (T-230) (sync/test pattern)
318KBd/228 GFSK (scrambler)
Rus PSK4 1200Bd (sync/CRC)
CIS-1200 (T-230-1A) (sync/test pattern)
x^8+x^6+x+1SAAB GRINTEG MHF 50
CIS-75 (128-bit)
x^7+x^6+1CIS-75 126-bit (sync/test pattern, one bit in error)
French-Ny 50Bd/850 FSK-2 (marker)
x^7+x^5+x+1 50Bd/500 FSK-2
x^7+x^4+1 Unid (sync)
x^7+x^3+1 Swiss Army TC-535 (PN sequence generator)
x^6+x^5+1French-Ny 50Bd/850 FSK-2 (marker)
300Bd/500 FSK-2 (scrambler?)
STANAG-4481F (test pattern?)
x^5+x^4+x+150Bd/500 FSK-2
200Bd/400 MFSK-4
x^5+x^4+1CIS-11 idle signal β
x^4+x^3+1CIS-Ny "Akula" (scrambler)
x^3+x^2+x+1256-bit Initialization Vectors encryption system
x^3+x^2+1CIS-11 idle signal α (used as sync/test in d0-d4,s0-s1 bits)

Some notes (...remember, google is your friend).
Any PRBSn sequence will have a word length of n bits and a max sequence length of 2^n - 1 bits (also termed period T). The maximum periodicity of the sequence can only be achieved through XOR-ing only some combinations of a few particular stages of the LFSR: if the produced sequence  has the maximum periodicity  (T=2^n -1, maximum-length sequence) then that sequence is known as m-sequence and its characteristic polynomial is termed primitive polynomial:
 
There can be more than one maximum-length sequence for a given LFSR length. Also, once one m-sequence has been found, another automatically follows. If the tap sequence in an n-bit LFSR is [n, A, B, C] then the corresponding "mirror" sequence is [n, nA, nB, nC].  So the tap sequence [6, 5] has as its counterpart [6, 1], ie in terms of polynomials x^6+x^5+1 --> x^6+x+1 --> x^6+x^5+1.
 
With short sequence lengths the pattern is repeated many times, which has the effect of reducing the randomness of the signal, especially at higher bit rates. Long sequence lengths offer more randomness, however they have the disadvantage of taking a longer time to complete the entire sequence, which can be a issue at lower bit rates.

Notice that although a PRBS sequence demonstrates random behaviour, it is in fact generated deterministically and the bit sequence (short or long) will always be the same when repeated. By the way, a truly random sequence would be unusable, since receiving equipment would have no idea what was actually sent.

No comments:

Post a Comment