Generate maximum length binary sequence (pseudo-random binary sequence).
Syntax
bitseries = mlbs(log2N)
[bitseries,nextstnum] = mlbs(log2N,bitno,startnum)
Description
mlbs generates a maximum length binary sequence (column vector bitseries), using a shift register of length log2N. The minimum value of the argument log2N is 2, the maximum value is 30. The length of the generated sequence is given by bitno, that is, a partial sequence can also be generated. The default value of bitno is 2^log2N-1, that is, the full length of the PRBS with the given register length.
The generation is based on a binary shift register with modulo 2 feedback. The starting value of the register is startnum. The register contents can be obtained via nextstnum, which can be used for the continuation of the sequence generation.
Default Argument Values
bitno = 2^log2N-1, startnum = 2^log2N-1
Examples
bitseries = mlbs(10); %Length: N = 1023 = 2^10-1
Diagnostics
The register length must be an integer number between the allowed minimum and maximum, otherwise an error message is sent:
log2N is not integer
or
log2N = ... is not allowed
startnum must be between 1 and 2log2N-1, otherwise the error message is
startnum out of range
Algorithm
The feedback shift register is implemented in a MATLAB vector, according to the definition (see [1]).
See Also
dibs
References
[1] K. R. Godfrey, ed.: Perturbation Signals for System Identification. Englewood Cliffs, Prentice-Hall, 1993.
[ Previous | Help Desk | Next ]