Effacer les filtres
Effacer les filtres

How can I embed a data matrix into DMRS in 5G-NR?

6 vues (au cours des 30 derniers jours)
ÖMER FARUK ORUÇ le 18 Fév 2024
How can I embed a 40*8 char size data matrix into a DMRS signal using 5G-NR in the Matlab environment?
(While doing this, PDSCH can be used.)
  1 commentaire
Garmit Pant
Garmit Pant le 29 Fév 2024
Can you please share the MATLAB code that you are using and also clarify what is the downstream task that you need to do with the DMRS signal?

Connectez-vous pour commenter.

Réponse acceptée

Garmit Pant
Garmit Pant le 5 Mar 2024
From what I gather, you are working with Demodulation Reference Signal (DMRS) in a 5G New Radio (NR) context. You want to embed your own data into the DMRS that is available in the form of 40x8 character array representing binary data.
DMRS is typically used for channel estimation. Embedding user data, replacing the standard DMRS symbols, is not compliant with 5G NR standards. You can still simulate the operation by modulating the binary data and mapping it onto a resource grid. The following code snippet shows you how to do so.
% Define the size of the data matrix and generate random data
% Replace “dataMatrix” with your data
numRows = 40;
numCols = 8;
dataMatrix = char(randi([0, 1], numRows, numCols) + '0'); % '0' and '1' characters
% Convert the character matrix to a binary sequence
binarySequence = (dataMatrix - '0').'; % Convert to binary and transpose to get a column vector
% Modulate the binary sequence using BPSK (since the data is binary)
modulatedData = nrSymbolModulate(binarySequence(:), 'BPSK');
% Create a carrier configuration object with default settings
carrierConfig = nrCarrierConfig();
% Create a PDSCH configuration object with default settings
pdschConfig = nrPDSCHConfig();
% Generate DMRS symbols and indices
dmrsSymbols = nrPDSCHDMRS(carrierConfig, pdschConfig);
dmrsIndices = nrPDSCHDMRSIndices(carrierConfig, pdschConfig);
% Create the resource grid
K = carrierConfig.NSizeGrid * 12; % Number of subcarriers
L = 14; % Number of OFDM symbols in a slot
resourceGrid = zeros(K, L);
% Map the modulated data to the DMRS indices
% This is not standard-compliant and for simulation purposes only
resourceGrid(dmrsIndices) = modulatedData(1:length(dmrsIndices));
% Perform the OFDM modulation to generate the time-domain waveform
ofdmWaveform = nrOFDMModulate(carrierConfig, resourceGrid);
% The waveform 'ofdmWaveform' now contains the non-standard DMRS-like data and can be
% further processed for transmission in a simulation environment.
% Visualise the waveform
title('OFDM Waveform Time-Domain Representation');
xlabel('Sample Index');
grid on;
Please note that this is a link level simulation and this operation is not possible for a system level simulation.
For further understanding, refer to the following MATLAB Documentation:
  1. nrSymbolModulate” function: https://www.mathworks.com/help/5g/ref/nrsymbolmodulate.html
  2. nrOFDMModulate” function: https://www.mathworks.com/help/5g/ref/nrofdmmodulate.html
I hope you find the above explanation and suggestions useful!

Plus de réponses (0)


En savoir plus sur Uplink Channels dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by