You are on page 1of 5

Expt.

No: MODELING OF 5G SYNCHRONIZATION SIGNAL BLOCKS AND BURSTS


Page no:
Date :

AIM:
To generate and visualize the SS burst for a specific 5G NR configuration.

SOFTWARE REQUIRED:
MATLAB

THEORY:
5G synchronization signal blocks (SSBs) and bursts are essential components of 5G NR
(New Radio) networks. SSBs are used for initial cell detection and synchronization, while bursts
contain additional information. Modeling these in a simplified way involves the following:
Frequency and Time Domain: SSBs are transmitted in the frequency domain, typically using
resource blocks within a specific bandwidth part. You can model this by defining the center
frequency and time duration of SSBs.
SSB Structure: SSBs consist of multiple SSB bursts. Each burst contains a primary
synchronization signal (PSS) and a secondary synchronization signal (SSS). You can model the
structure of these bursts and the positions of PSS and SSS within them.
Reference Signals: 5G SSBs also include reference signals for channel estimation. You can
simulate the placement and characteristics of these reference signals in your model.
Modulation and Coding: 5G SSBs use specific modulation schemes and coding. You can
incorporate these into your model to accurately represent the transmitted data.
Beamforming: Consider the use of beamforming for SSBs, where multiple beams may be used
to cover different directions. This involves modeling the beamforming patterns and their
variations.
Antenna Characteristics: Model the antenna characteristics, such as the antenna gain, radiation
patterns, and polarization, which can affect the SSB transmission and reception.
Propagation Effects: Incorporate channel models and path loss models to simulate how SSBs
and bursts propagate through the wireless channel, including fading and attenuation effects.
Receiver Processing: Model the receiver side, including synchronization and decoding
algorithms, to analyze how SSBs and bursts are processed at the receiving end.
Page no:

Timing and Synchronization: Ensure that the timing and synchronization aspects of SSBs are
accurately represented in your model, as these are critical for initial cell search and handover
procedures.
Simulation Tools: Utilize simulation tools like MATLAB, Python (using libraries like NumPy
and SciPy), or specialized wireless communication simulation software to implement and
analyze your SSB and burst models.

ALGORITHM
1. Initialize Parameters:
• Set the number of subframes (nSubframes) to 5.
• Define the number of symbols per slot (symbolsPerSlot) as 14.
• Set the modulation order (mu) to 1.
• Define the cell ID (ncellid) as 17.
2. Generate and Assign PSS (Primary Synchronization Signal):
• Use the nrPSS function to generate PSS symbols based on the ncellid.
• Obtain the PSS indices using nrPSSIndices.
• Assign the PSS symbols to the ssblock matrix, multiplying them by 1.
3. Calculate the Total Number of Symbols (nSymbols):
•Calculate nSymbols by multiplying symbolsPerSlot by 2 raised to the power of mu and then
by nSubframes.
4. Generate and Assign SSS (Secondary Synchronization Signal):
• Use the nrSSS function to generate SSS symbols based on the ncellid.
• Obtain the SSS indices using nrSSSIndices.
• Assign the SSS symbols to the ssblock matrix, multiplying them by 2.
5. Generate Random Channel Information (cw):
• Generate a random binary channel information vector of size 864.
6. Initialize Variables for PBCH (Physical Broadcast Channel):
• Set v to 0.
• Generate PBCH symbols using the nrPBCH function with cw, ncellid, and v.
• Obtain PBCH indices using nrPBCHIndices.
• Assign the PBCH symbols to the ssblock matrix, multiplying them by 3.
7. Initialize Variables for DMRS (Demodulation Reference Signals):
• Set ibar_SSB to 0.
Page no:

•Generate DMRS symbols for PBCH using the nrPBCHDMRS function with ncellid and
ibar_SSB.
• Obtain DMRS indices for PBCH using nrPBCHDMRSIndices.
• Assign the DMRS symbols to the ssblock matrix, multiplying them by 4.
8. Initialize the ssburst Matrix:
• Create an empty matrix ssburst with dimensions [240, nSymbols].
9. Define Timing Indices:
• Define an array n as [0, 1].
• Calculate firstSymbolIndex based on n and a pattern [4; 8; 16; 20].
10. Reinitialize ssblock Matrix:
• Reinitialize the ssblock matrix to zeros with dimensions [240, 4].
11. Populate ssburst with SS Blocks:
• Loop through each ssbIndex from 1 to the length of firstSymbolIndex.
• Calculate i_SSB and update ibar_SSB and v accordingly.
• Generate PBCH symbols and DMRS symbols based on the updated values.
• Assign PBCH and DMRS symbols to the appropriate indices in ssblock.
• Update the corresponding part of ssburst with the content of ssblock.
12. Plot the SS Burst:
• Use the imagesc function to create an image plot of the magnitude of ssburst.
• Set axis labels, axis scaling, and a title for the plot.

PROGRAM
%Generating an SS burst
nSubframes = 5
symbolsPerSlot = 14
mu = 1
ncellid = 17;
pssSymbols = nrPSS(ncellid)
pssIndices = nrPSSIndices;
ssblock(pssIndices) = 1 * pssSymbols;
nSymbols = symbolsPerSlot * 2^mu * nSubframes
sssSymbols = nrSSS(ncellid)
sssIndices = nrSSSIndices;
Page no:

%Create SS burst content


ssblock(sssIndices) = 2 * sssSymbols;
sssSubscripts =
nrSSSIndices('IndexStyle','subscript','IndexBase','0based')

%Physical Broadcast Channel (PBCH)


cw = randi([0 1],864,1);
v = 0;
pbchSymbols = nrPBCH(cw,ncellid,v)
pbchIndices = nrPBCHIndices(ncellid);
ssblock(pbchIndices) = 3 * pbchSymbols;

%PBCH Demodulation Reference Signal (PBCH DM-RS)


ibar_SSB = 0;
dmrsSymbols = nrPBCHDMRS(ncellid,ibar_SSB)
dmrsIndices = nrPBCHDMRSIndices(ncellid);
ssblock(dmrsIndices) = 4 * dmrsSymbols;
ssburst = zeros([240 nSymbols]);
n = [0, 1];
firstSymbolIndex = [4; 8; 16; 20] + 28*n;
firstSymbolIndex = firstSymbolIndex(:).'

%Create SS burst content


ssblock = zeros([240 4]);
ssblock(pssIndices) = pssSymbols;
ssblock(sssIndices) = 2 * sssSymbols;

for ssbIndex = 1:length(firstSymbolIndex)


i_SSB = mod(ssbIndex - 1,8);
ibar_SSB = i_SSB;
v = i_SSB;
Page no:

pbchSymbols = nrPBCH(cw,ncellid,v);
ssblock(pbchIndices) = 3 * pbchSymbols;
dmrsSymbols = nrPBCHDMRS(ncellid,ibar_SSB);
ssblock(dmrsIndices) = 4 * dmrsSymbols;
ssburst(:,firstSymbolIndex(ssbIndex) + (0:3)) = ssblock;
end

imagesc(abs(ssburst));
%clim([0 4]);
axis xy;
xlabel('OFDM symbol');
ylabel('Subcarrier');
title('SS burst, block pattern Case B');

RESULT:

Thus the Matlab code for Synchronization signal blocks and bursts for a specific 5G NR
configuration was simulated.

You might also like