Pseudorandom binary sequence

Last updated

A pseudorandom binary sequence (PRBS), pseudorandom binary code or pseudorandom bitstream is a binary sequence that, while generated with a deterministic algorithm, is difficult to predict [1] and exhibits statistical behavior similar to a truly random sequence. PRBS generators are used in telecommunication, such as in analog-to-information conversion, [2] but also in encryption, simulation, correlation technique and time-of-flight spectroscopy. The most common example is the maximum length sequence generated by a (maximal) linear feedback shift register (LFSR). Other examples are Gold sequences (used in CDMA and GPS), Kasami sequences and JPL sequences, all based on LFSRs.

Contents

In telecommunications, pseudorandom binary sequences are known as pseudorandom noise codes (PN or PRN codes) due to their application as pseudorandom noise.

Details

A binary sequence (BS) is a sequence of bits, i.e.

for .

A BS consists of ones and zeros.

A BS is a pseudorandom binary sequence (PRBS) if [3] its autocorrelation function, given by

has only two values:

where

is called the duty cycle of the PRBS, similar to the duty cycle of a continuous time signal. For a maximum length sequence, where , the duty cycle is 1/2.

A PRBS is 'pseudorandom', because, although it is in fact deterministic, it seems to be random in a sense that the value of an element is independent of the values of any of the other elements, similar to real random sequences.

A PRBS can be stretched to infinity by repeating it after elements, but it will then be cyclical and thus non-random. In contrast, truly random sequence sources, such as sequences generated by radioactive decay or by white noise, are infinite (no pre-determined end or cycle-period). However, as a result of this predictability, PRBS signals can be used as reproducible patterns (for example, signals used in testing telecommunications signal paths). [4]

Practical implementation

Pseudorandom binary sequences can be generated using linear-feedback shift registers. [5]

Some common [6] [7] [8] [9] [10] sequence generating monic polynomials are

PRBS7 =
PRBS9 =
PRBS11 =
PRBS13 =
PRBS15 =
PRBS20 =
PRBS23 =
PRBS31 =

An example of generating a "PRBS-7" sequence can be expressed in C as

#include<stdio.h>#include<stdint.h>#include<stdlib.h>intmain(intargc,char*argv[]){uint8_tstart=0x02;uint8_ta=start;inti;for(i=1;;i++){intnewbit=(((a>>6)^(a>>5))&1);a=((a<<1)|newbit)&0x7f;printf("%x\n",a);if(a==start){printf("repetition period is %d\n",i);break;}}}

In this particular case, "PRBS-7" has a repetition period of 127 values.

Notation

The PRBSk or PRBS-k notation (such as "PRBS7" or "PRBS-7") gives an indication of the size of the sequence. is the maximum number [4] :§3 of bits that are in the sequence. The k indicates the size of a unique word of data in the sequence. If you segment the N bits of data into every possible word of length k, you will be able to list every possible combination of 0s and 1s for a k-bit binary word, with the exception of the all-0s word. [4] :§2 For example, PRBS3 = "1011100" could be generated from . [6] If you take every sequential group of three bit words in the PRBS3 sequence (wrapping around to the beginning for the last few three-bit words), you will find the following 7 word arrangements:

  "1011100"  101   "1011100"  011   "1011100"  111   "1011100"  110   "1011100"  100   "1011100"  001 (requires wrap)   "1011100"  010 (requires wrap)

Those 7 words are all of the possible non-zero 3-bit binary words, not in numeric order. The same holds true for any PRBSk, not just PRBS3. [4] :§2

See also

Related Research Articles

A pseudorandom sequence of numbers is one that appears to be statistically random, despite having been produced by a completely deterministic and repeatable process. Simply put, the problem is that many of the sources of randomness available to humans rely on physical processes not readily available to computer programs.

In digital transmission, the number of bit errors is the numbers of received bits of a data stream over a communication channel that have been altered due to noise, interference, distortion or bit synchronization errors.

In telecommunications, a scrambler is a device that transposes or inverts signals or otherwise encodes a message at the sender's side to make the message unintelligible at a receiver not equipped with an appropriately set descrambling device. Whereas encryption usually refers to operations carried out in the digital domain, scrambling usually refers to operations carried out in the analog domain. Scrambling is accomplished by the addition of components to the original signal or the changing of some important component of the original signal in order to make extraction of the original signal difficult. Examples of the latter might include removing or changing vertical or horizontal sync pulses in television signals; televisions will not be able to display a picture from such a signal. Some modern scramblers are actually encryption devices, the name remaining due to the similarities in use, as opposed to internal operation.

A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG), is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random numbers. The PRNG-generated sequence is not truly random, because it is completely determined by an initial value, called the PRNG's seed. Although sequences that are closer to truly random can be generated using hardware random number generators, pseudorandom number generators are important in practice for their speed in number generation and their reproducibility.

<span class="mw-page-title-main">Linear congruential generator</span> Algorithm for generating pseudo-randomized numbers

A linear congruential generator (LCG) is an algorithm that yields a sequence of pseudo-randomized numbers calculated with a discontinuous piecewise linear equation. The method represents one of the oldest and best-known pseudorandom number generator algorithms. The theory behind them is relatively easy to understand, and they are easily implemented and fast, especially on computer hardware which can provide modular arithmetic by storage-bit truncation.

The Mersenne Twister is a general-purpose pseudorandom number generator (PRNG) developed in 1997 by Makoto Matsumoto and Takuji Nishimura. Its name derives from the fact that its period length is chosen to be a Mersenne prime.

A Lagged Fibonacci generator is an example of a pseudorandom number generator. This class of random number generator is aimed at being an improvement on the 'standard' linear congruential generator. These are based on a generalisation of the Fibonacci sequence.

<span class="mw-page-title-main">Stream cipher</span> Type of symmetric key cipher

A stream cipher is a symmetric key cipher where plaintext digits are combined with a pseudorandom cipher digit stream (keystream). In a stream cipher, each plaintext digit is encrypted one at a time with the corresponding digit of the keystream, to give a digit of the ciphertext stream. Since encryption of each digit is dependent on the current state of the cipher, it is also known as state cipher. In practice, a digit is typically a bit and the combining operation is an exclusive-or (XOR).

In computing, a linear-feedback shift register (LFSR) is a shift register whose input bit is a linear function of its previous state.

A cryptographically secure pseudorandom number generator (CSPRNG) or cryptographic pseudorandom number generator (CPRNG) is a pseudorandom number generator (PRNG) with properties that make it suitable for use in cryptography. It is also loosely known as a cryptographic random number generator (CRNG).

In cryptography, the shrinking generator is a form of pseudorandom number generator intended to be used in a stream cipher. It was published in Crypto 1993 by Don Coppersmith, Hugo Krawczyk, and Yishay Mansour.

In mathematics, a low-discrepancy sequence is a sequence with the property that for all values of N, its subsequence x1, ..., xN has a low discrepancy.

The Berlekamp–Massey algorithm is an algorithm that will find the shortest linear-feedback shift register (LFSR) for a given binary output sequence. The algorithm will also find the minimal polynomial of a linearly recurrent sequence in an arbitrary field. The field requirement means that the Berlekamp–Massey algorithm requires all non-zero elements to have a multiplicative inverse. Reeds and Sloane offer an extension to handle a ring.

In finite field theory, a branch of mathematics, a primitive polynomial is the minimal polynomial of a primitive element of the finite field GF(pm). This means that a polynomial F(X) of degree m with coefficients in GF(p) = Z/pZ is a primitive polynomial if it is monic and has a root α in GF(pm) such that is the entire field GF(pm). This implies that α is a primitive (pm − 1)-root of unity in GF(pm).

A maximum length sequence (MLS) is a type of pseudorandom binary sequence.

Inversive congruential generators are a type of nonlinear congruential pseudorandom number generator, which use the modular multiplicative inverse to generate the next number in a sequence. The standard formula for an inversive congruential generator, modulo some prime q is:

A nonlinear-feedback shift register (NLFSR) is a shift register whose input bit is a non-linear function of its previous state.

<span class="mw-page-title-main">GPS signals</span> Signals broadcast by GPS satellites

GPS signals are broadcast by Global Positioning System satellites to enable satellite navigation. Receivers on or near the Earth's surface can determine location, time, and velocity using this information. The GPS satellite constellation is operated by the 2nd Space Operations Squadron (2SOPS) of Space Delta 8, United States Space Force.

In cryptography, an alternating step generator (ASG) is a cryptographic pseudorandom number generator used in stream ciphers, based on three linear-feedback shift registers. Its output is a combination of two LFSRs which are stepped (clocked) in an alternating fashion, depending on the output of a third LFSR.

<span class="mw-page-title-main">Computation of cyclic redundancy checks</span> Overview of the computation of cyclic redundancy checks

Computation of a cyclic redundancy check is derived from the mathematics of polynomial division, modulo two. In practice, it resembles long division of the binary message string, with a fixed number of zeroes appended, by the "generator polynomial" string except that exclusive or operations replace subtractions. Division of this type is efficiently realised in hardware by a modified shift register, and in software by a series of equivalent algorithms, starting with simple code close to the mathematics and becoming faster through byte-wise parallelism and space–time tradeoffs.

References

  1. "PRBS Pseudo Random Bit Sequence Generation". TTi. Retrieved 21 January 2016.
  2. Daponte, Pasquale; De Vito, Luca; Iadarola, Grazia; Rapuano, Sergio. "PRBS non-idealities affecting Random Demodulation Analog-to-Information Converters" (PDF).
  3. Naszodi, Laszlo. "Articles on Correlation and Calibration". Archived from the original on 11 November 2013.
  4. 1 2 3 4 "ITU-T Recommendation O.150". October 1992.
  5. Paul H. Bardell, William H. McAnney, and Jacob Savir, "Built-In Test for VLSI: Pseudorandom Techniques", John Wiley & Sons, New York, 1987.
  6. 1 2 Tomlinson, Kurt (4 February 2015). "PRBS (Pseudo-Random Binary Sequence)". Bloopist. Retrieved 21 January 2016.
  7. Koopman, Philip. "Maximal Length LFSR Feedback Terms" . Retrieved 21 January 2016.
  8. "What are the PRBS7, PRBS15, PRBS23, and PRBS31 polynomials used in the Altera Transceiver Toolkit?". Altera . 14 February 2013. Retrieved 21 January 2016.
  9. Riccardi, Daniele; Novellini, Paolo (10 January 2011). "An Attribute-Programmable PRBS Generator and Checker (XAP884)" (PDF). Xilinx . Table 3:Configuration for PRBS Polynomials Most Used to Test Serial Lines. Retrieved 21 January 2016.
  10. "O.150 : General requirements for instrumentation for performance measurements on digital transmission equipment". 1997-01-06.