commpy.sequences.pnsequence

pnsequence(pn_order, pn_seed, pn_mask, seq_length)

Generate a PN (Pseudo-Noise) sequence using a Linear Feedback Shift Register (LFSR).

Parameters:
  • pn_order (int) – Number of delay elements used in the LFSR.
  • pn_seed (string containing 0's and 1's) – Seed for the initialization of the LFSR delay elements. The length of this string must be equal to ‘pn_order’.
  • pn_mask (string containing 0's and 1's) – Mask representing which delay elements contribute to the feedback in the LFSR. The length of this string must be equal to ‘pn_order’.
  • seq_length (int) – Length of the PN sequence to be generated. Usually (2^pn_order - 1)
Returns:

pnseq – PN sequence generated.

Return type:

1D ndarray of ints