Home of RF and Wireless Vendors and Resources

One Stop For Your RF and Wireless Need

Gold Sequence Generator in MATLAB | 5G NR Gold Sequence

This page covers 5G NR Gold sequence. It mentions simulation of gold sequence generator in MATLAB and use of gold sequence in 5G NR technology.

Introduction: There are three sequences used in 5G NR wireless system viz. Zadoff chu sequence, gold sequence and m-sequence. Gold sequence is used in CP-OFDM, Zadoff-chu sequence is used in DFT-s-OFDM (for SSS) and m-sequence is used in PSS.

Gold Sequence use in 5G NR

• It is a BPSK modulated sequence with length of 127.
• It is used for NR SSS (Secondary Synchronization Signal).
• It is used to fix time/frequency offset ambiguity problem encountered in zadoff-chu sequence used in the previous LTE technology.
• SSS is part of 5G NR SS along with PSS.
• The combination of SS and PBCH is referred to as SSB in NR.
• DMRS sequence for CP-OFDM Physical layer is 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) of length MPN, where n = 0, 1, .... MPN-1 is defined as follows.
c(n) = {x1*(n+Nc) + x2*(n+Nc)} mod2
x1 (n+31) = { x1*(n+3) + x1*(n)}mod2
x2 (n+31) = { x2*(n+3) + x2*(n+2) + x2*(n+1) + x2*(n)}mod2
where Nc =1600 and the first m-sequence x1(n) shall be initialized with x1(0) = 1, x1(n) =0, n =1,2,....30. The initialization of the second m-sequence, x2(n) is denoted by Cinit as follows. The values depend on the application of the sequence.
5G NR equation3

Gold Sequence Generator in MATLAB

➤Mathworks database has following gold sequence generation program with m-files.
➤Download version developed by Sanjeet Kumar from following link using login details after subscribing with mathworks.
➤This m-file generate Gold Sequences of length 31 by taking the modulo-2 sum of two m-sequence generators.
Gold Sequence generation m files>>
➤ Also refer Gold Sequence generator >>

Also refer 5G NR m-sequence and Zadoff-chu sequence for more information.

5G NR Numerology | 5G NR Terminology

5G NR Control channels | 5G NR Traffic Channels | 5G NR Reference Signals and sequences


This 5G tutorial also covers following sub topics on the 5G technology:
5G basic tutorial
5G Frequency Bands
5G millimeter wave tutorial
5G mm wave frame
5G millimeter wave channel sounding
Difference between 4G and 5G
5G testing and test equipments
5G network architecture
5G NR Physical layer
5G NR MAC layer
5G NR RLC layer
5G NR PDCP layer

What is Difference between

difference between FDM and OFDM
Difference between SC-FDMA and OFDM
Difference between SISO and MIMO
Difference between TDD and FDD
Difference between 802.11 standards viz.11-a,11-b,11-g and 11-n
Bluetooth vs zigbee
Fixed wimax vs mobile
wibro vs mobile wimax
Microcontroller vs microprocessor

RF and Wireless Terminologies

Share this page

Translate this page