optic.comm.sources.prbsGenerator
- prbsGenerator(order=23, length=None, seed=1)
Generate a Pseudo-Random Binary Sequence (PRBS) of the given order.
- Parameters:
order (int) – The order of the PRBS sequence. Supported orders are 7, 9, 11, 13, 15, 23, 31.
length (int, optional) – The length of the PRBS sequence to generate. If not specified, the length is \(2^{order} - 1\).
seed (int, optional) – The seed for the linear feedback shift register (LFSR). Default is 1.
- Returns:
bits – A NumPy array of bits representing the PRBS sequence.
- Return type:
np.array
References
[1] Wikipedia, “Pseudorandom binary sequence,” https://en.wikipedia.org/wiki/Pseudorandom_binary_sequence