RF Wireless World

Browse articles, tutorials, tools, and vendors.

5G NR Gold Sequence Generation in MATLAB

By RF Wireless Expert Team

This page provides information on the 5G NR Gold sequence, including a MATLAB simulation of the gold sequence generator and its use in 5G NR technology.

Introduction

In 5G NR wireless systems, three main types of sequences are used: Zadoff-Chu sequences, Gold sequences, and m-sequences. Gold sequences are used in CP-OFDM, Zadoff-Chu sequences are used in DFT-s-OFDM (specifically for SSS), and m-sequences are used in PSS.

Gold Sequence Use in 5G NR

  • It is a BPSK modulated sequence with a length of 127.
  • It is used for the NR SSS (Secondary Synchronization Signal).
  • It helps to resolve time/frequency offset ambiguity problems that were encountered with Zadoff-Chu sequences in previous LTE technology.
  • SSS is a component of the 5G NR SS (Synchronization Signal) along with PSS.
  • The combination of SS and PBCH (Physical Broadcast Channel) is referred to as SSB (SS Block) in NR.
  • DMRS (Demodulation Reference Signal) sequences for CP-OFDM Physical layer are QPSK based on Gold sequences.
  • Generic pseudo-random sequences are defined by a length-31 Gold sequence.

It is specified in TS 38.211 as follows:

The output sequence c(n)c(n) of length MPNM_{PN}, where n=0,1,...,MPN1n = 0, 1, ..., M_{PN} - 1, is defined as:

c(n)=(x1(n+Nc)+x2(n+Nc))mod2c(n) = (x_1(n + N_c) + x_2(n + N_c)) \mod 2

x1(n+31)=(x1(n+3)+x1(n))mod2x_1(n + 31) = (x_1(n + 3) + x_1(n)) \mod 2

x2(n+31)=(x2(n+3)+x2(n+2)+x2(n+1)+x2(n))mod2x_2(n + 31) = (x_2(n + 3) + x_2(n + 2) + x_2(n + 1) + x_2(n)) \mod 2

where Nc=1600N_c = 1600 and the first m-sequence x1(n)x_1(n) is initialized with:

x1(0)=1x_1(0) = 1, x1(n)=0x_1(n) = 0, n=1,2,...,30n = 1, 2, ..., 30.

The initialization of the second m-sequence, x2(n)x_2(n), is denoted by CinitC_{init}, and its values depend on the specific application of the sequence.

5G NR equation3

Gold Sequence Generator in MATLAB

  • MathWorks offers a Gold sequence generation program with m-files.
  • You can download version 1.0.0.0 developed by Sanjeet Kumar from [MathWorks](Link needed, requires login). You’ll need to log in after subscribing to MathWorks.
  • This m-file generates Gold Sequences of length 31 by taking the modulo-2 sum of two m-sequence generators.

Continue Learning 5G NR

Continue Learning 5G NR Frame Essentials

Keep Reading