How to perform Uplink synchronization between two SDR's?

Dear Everyone,
I would like to generate an Uplink signal using 5G toolbox from a UE (SDR-1) and send it to the gNB (SDR-2). How should I synchronize in between the two SDR's so that the signal is recevied properly on the gNB side. Do I have to add preamble from the UE? As I did not find anything related to it. Thank you.

Answers (1)

Hi @Fahad,

I went through list of 5G functions listed at https://www.mathworks.com/help/5g/referencelist.html?type=function&listtype=cat&category=index&blocktype=all&capability=&startrelease=&endrelease= to able to answer your question. The key point is synchronization which is essential to ensure that the gNB can accurately receive and decode the signals sent from the UE. Now, you probably aware of synchronization in 5G involves both time and frequency alignment. To achieve timing synchronization, the UE must align its transmission timing with the gNB’s expected timing which is typically achieved through a Random Access Channel (RACH) procedure where a preamble is sent by the UE to initiate communication. In order to achieve frequency synchronization, both SDRs need to operate on the same frequency band by getting them configured in the carrier settings. Also, adding a preamble is crucial for initial synchronization during the RACH procedure. The gNB uses this preamble to identify the UE and synchronize its timing. Here is a simplified example of how to generate an uplink signal using MATLAB's 5G Toolbox:

% Carrier configuration
carrierConfig = nrCarrierConfig('NCellID', 0, 'SubcarrierSpacing', 30, 
‘Bandwidth', 'B20');
% Preamble configuration
preambleConfig = nrPRACHConfig('Format', 'Format0', 'NCS', 0, 'NID', 0);
% Generate preamble symbols
[preambleSymbols, preambleIndices] = nrPRACH(preambleConfig, carrierConfig);
% Uplink Signal Generation
% Generate PUSCH configuration
puschConfig = nrPUSCHConfig('Modulation', 'QPSK', 'NumLayers', 1);
data = randi([0 1], puschConfig.NumSymbols*2, 1); % Random data bits
% Generate PUSCH symbols
puschSymbols = nrPUSCH(puschConfig, data);
% Combine preamble and PUSCH symbols into one signal
uplinkSignal = [preambleSymbols; puschSymbols];
% OFDM Modulation
modulatedSignal = nrOFDMModulate(uplinkSignal, carrierConfig);
% Transmit modulated signal from SDR-1 to SDR-2
% Assuming you have setup for SDR hardware transmission
transmitSDR(SDR1, modulatedSignal);

Please let me know if you have any further questions.

Categories

Products

Release

R2023b

Asked:

N/A
on 11 Aug 2024

Answered:

on 12 Aug 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!