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

3 次查看(过去 30 天)
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 个评论
Garmit Pant
Garmit Pant 2024-2-29
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?
Regards

请先登录,再进行评论。

采纳的回答

Garmit Pant
Garmit Pant 2024-3-5
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
figure;
plot(real(ofdmWaveform));
title('OFDM Waveform Time-Domain Representation');
xlabel('Sample Index');
ylabel('Amplitude');
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!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 AI for Wireless 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by