Pseudo Random (PN) Sequence

The pseudo-random sequence is used for generating all the sequence used as reference signal in 5G. The 3GPP has defined a sequence generation method ofr 5G in section 5.2.1 of [3GPPTS38211_PN] which uses two 31 length initial Gold sequences. The first initialization sequence is fixed and second initialization sequence is generated using a seed (\(c_{init}\)). This seed allows the base-station (BS) and user equipment (UE) to reproduce the PN sequence exactly.

Important

  • The seed (\(c_{init}\)) value is computed using an equation standardized by 3GPP for each reference signal.

If seed (\(c_{init}\)) is scalar:

c_init     = 25                  # seed value for generating the PN Sequence
seqLength  = 120                 # Length of the PN Sequence
pnObject   = PNSequence(c_init)  # Object for generating the PN sequence
pnSequence = pnObject(seqLength) # Generate [1x120] pn sequence using pnObject

If seed (\(c_{init}\)) is NumPy Array:

c_init     = np.array([11,21359,2780]) # Cell ID-2 for SSS generation
seqLength  = 161                       # Length of the PN Sequence
pnObject   = PNSequence(c_init)        # Object for generating the PN sequence
pnSequence = pnObject(seqLength)       # Generate [3x161] pss sequence using pnObject

The details about the input-output interface of the SSS implementation is provided below.

class toolkit5G.SequenceGeneration.PNSequence(c_init)[source]

Generates the pseudo-random (PN) sequence for 5G system. The constructor expects one parameter as an input c_init (seed) which can be a scaler or NumPy array of integer. The call method expect the length to be generated for the PN sequence and returns 1 or multiple PS sequences based on the size of c_init passed as input. The details about the implementation of the sequence are provided in section 7.4.2.3.1 of [3GPPTS38211_PN].

Parameters:

c_init (int or NumPy array, np.integer) – Defines seed (\(c_{init}\))

Input:

length (int) – Defines length of the PN Sequence

Output:

[…, length], np.int8 – pseudo random sequence.

Raises:
  • ValueError – [Error]: length of PN Sequence must be a positive (>0) integer!

  • ValueError – [Error]: c_init must be an integer or integer NumPy array!”

References:
[3GPPTS38211_PN] (1,2)

3GPP TS 38.211 “Physical channels and modulation (Release 17)”, V17.1.0 (2022-03).