Main Content

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

5G 채널 추정을 위한 딥러닝 데이터 합성

이 예제에서는 Deep Learning Toolbox™와 5G Toolbox™로 생성한 데이터를 사용하여 채널 추정을 위해 컨벌루션 신경망(CNN)을 훈련하는 방법을 보여줍니다. 훈련된 CNN을 사용하여 PDSCH(physical downlink shared channel) DM-RS(복조 기준 신호)를 이용해 SISO(단일 입력 단일 출력) 모드로 채널 추정을 수행합니다.

소개

채널 추정에 대한 일반적인 접근법은 알려진 기준 파일럿 심볼을 전송 내용에 삽입한 다음, 이러한 파일럿 심볼을 사용하여 나머지 채널 응답을 보간하는 것입니다.

이 채널 추정 접근법을 사용하는 방법에 대한 예제는 NR PDSCH 처리량 항목을 참조하십시오.

딥러닝 기법을 사용하여 채널 추정을 수행할 수도 있습니다. 예를 들어 리소스 그리드를 2차원 영상으로 간주하여 채널 추정 문제를 잡음 제거나 초고분해능같이 CNN을 쓰는 게 효과적인 영상 처리 문제로 전환할 수 있습니다.

5G Toolbox를 사용해 표준 준수 파형과 채널 모델을 사용자 지정하고 생성하여 훈련 데이터로 사용할 수 있습니다. Deep Learning Toolbox를 사용하면 이 훈련 데이터를 사용해 채널 추정 CNN을 훈련시킬 수 있습니다. 이 예제에서는 그러한 훈련 데이터를 생성하는 방법과 채널 추정 CNN을 훈련시키는 방법을 보여줍니다. 또한 채널 추정 CNN을 사용하여, 수신 후 선형 보간된 파일럿 심볼이 포함되어 있는 영상을 처리하는 방법도 보여줍니다. 예제는 신경망 채널 추정기의 결과를 실질적인 추정기 및 완벽한 추정기와 시각적으로 비교하여 보여줍니다.

신경망 훈련

신경망 훈련은 다음 단계로 구성됩니다.

  • 코드 생성

  • 생성된 데이터를 훈련 세트와 검증 세트로 분할

  • CNN 아키텍처 정의

  • 훈련 옵션, 최적화 함수, 학습률 지정

  • 신경망 훈련

신호가 많고 가능한 시나리오도 많기 때문에 훈련에 몇 분이 걸릴 수 있습니다. 기본적으로 훈련은 비활성화되며 미리 훈련된 모델이 사용됩니다. trainModel을 true로 설정하여 훈련을 활성화할 수 있습니다.

trainModel = false;

Parallel Computing Toolbox™가 설치되어 있고 지원되는 CUDA 지원 NVIDIA® GPU가 설정되어 있는 경우 신경망 훈련은 기본적으로 GPU 가속화를 사용합니다. trainNetwork (Deep Learning Toolbox) 함수를 사용하면 이 디폴트 동작을 재정의할 수 있습니다. 지원되는 GPU의 목록을 보려면 GPU 연산 요구 사항 (Parallel Computing Toolbox) 항목을 참조하십시오.

데이터 생성은 256개의 훈련 예제 또는 훈련 데이터 세트를 생성하도록 설정됩니다. 이 정도 양의 데이터라면 제대로 동작하는 채널 추정 신경망을 CPU에서 적절한 시간 내에 훈련시키기에 충분합니다. 비교를 위해, 이 사전 훈련된 모델은 16,384개의 훈련 예제를 기반으로 합니다.

CNN 모델의 훈련 데이터는 고정된 크기 차원을 가지며, 신경망은 612×14×1 그리드(즉, 612개의 부반송파, 14개의 OFDM 심볼, 1개의 안테나)만 받을 수 있습니다. 따라서 모델은 고정된 대역폭 할당, 순환 전치 길이, 단일 수신 안테나에서만 작동할 수 있습니다.

CNN은 리소스 그리드를 2차원 영상으로 취급하므로 그리드의 각 요소는 실수여야 합니다. 채널 추정 시나리오에서 리소스 그리드는 복소수 데이터를 가지고 있습니다. 따라서 이러한 그리드의 실수부와 허수부는 별도로 CNN에 입력됩니다. 이 예제에서는 훈련 데이터가 복소수 값 612×14 행렬에서 실수 값 612×14×2 행렬로 변환됩니다. 여기서 세 번째 차원은 실수부와 허수부를 나타냅니다. 예측을 수행할 때 실수 그리드와 허수 그리드를 별도로 신경망에 입력해야 하기 때문에 예제에서는 훈련 데이터를 612×14×1×2N 형태의 4차원 배열로 변환합니다. 여기서 N은 훈련 예제의 개수입니다.

CNN이 훈련 데이터를 과적합하지 않도록 훈련 데이터를 검증 세트와 훈련 세트로 분할합니다. 검증 데이터는 valFrequency에 의해 정의된 대로 Epoch당 약 5개씩 일정한 간격으로 훈련된 신경망의 성능을 모니터링하는 데 사용됩니다. 검증 손실의 개선이 멈출 때 훈련을 중지합니다. 이 예제에서는 데이터 세트의 크기가 작기 때문에 검증 데이터의 크기가 단일 미니 배치의 크기와 같습니다.

반환된 채널 추정 CNN은 서로 다른 지연 확산, 도플러 편이, 0~10dB 사이의 SNR 범위를 기반으로 다양한 채널 구성에서 훈련됩니다.

% Set the random seed for reproducibility (this has no effect if a GPU is
% used)
rng(42)

if trainModel
    % Generate the training data
    [trainData,trainLabels] = hGenerateTrainingData(256);

    % Set the number of examples per mini-batch
    batchSize = 32;

    % Split real and imaginary grids into 2 image sets, then concatenate
    trainData = cat(4,trainData(:,:,1,:),trainData(:,:,2,:));
    trainLabels = cat(4,trainLabels(:,:,1,:),trainLabels(:,:,2,:));

    % Split into training and validation sets
    valData = trainData(:,:,:,1:batchSize);
    valLabels = trainLabels(:,:,:,1:batchSize);

    trainData = trainData(:,:,:,batchSize+1:end);
    trainLabels = trainLabels(:,:,:,batchSize+1:end);

    % Validate roughly 5 times every epoch
    valFrequency = round(size(trainData,4)/batchSize/5);

    % Define the CNN structure
    layers = [ ...
        imageInputLayer([612 14 1],'Normalization','none')
        convolution2dLayer(9,64,'Padding',4)
        reluLayer
        convolution2dLayer(5,64,'Padding',2,'NumChannels',64)
        reluLayer
        convolution2dLayer(5,64,'Padding',2,'NumChannels',64)
        reluLayer
        convolution2dLayer(5,32,'Padding',2,'NumChannels',64)
        reluLayer
        convolution2dLayer(5,1,'Padding',2,'NumChannels',32)
        regressionLayer
    ];

    % Set up a training policy
    options = trainingOptions('adam', ...
        'InitialLearnRate',3e-4, ...
        'MaxEpochs',5, ...
        'Shuffle','every-epoch', ...
        'Verbose',false, ...
        'Plots','training-progress', ...
        'MiniBatchSize',batchSize, ...
        'ValidationData',{valData, valLabels}, ...
        'ValidationFrequency',valFrequency, ...
        'ValidationPatience',5);

    % Train the network. The saved structure trainingInfo contains the
    % training progress for later inspection. This structure is useful for
    % comparing optimal convergence speeds of different optimization
    % methods.
    [channelEstimationCNN,trainingInfo] = trainNetwork(trainData, ...
        trainLabels,layers,options);

else
    % Load pretrained network if trainModel is set to false
    load('trainedChannelEstimationNetwork.mat')
end

모델의 구성과 개별 계층을 검사합니다. 모델에는 5개의 컨벌루션 계층이 있습니다. 입력 계층은 크기가 612×14인 행렬이 필요하며, 여기서 612는 부반송파의 수이고 14는 OFDM 심볼의 수입니다. 복소수 그리드의 실수부와 허수부는 별도로 입력되므로 각 요소는 실수입니다.

channelEstimationCNN.Layers
ans = 

  11x1 Layer array with layers:

     1   'imageinput'         Image Input         612x14x1 images
     2   'conv_1'             2-D Convolution     64 9x9x1 convolutions with stride [1  1] and padding [4  4  4  4]
     3   'relu_1'             ReLU                ReLU
     4   'conv_2'             2-D Convolution     64 5x5x64 convolutions with stride [1  1] and padding [2  2  2  2]
     5   'relu_2'             ReLU                ReLU
     6   'conv_3'             2-D Convolution     64 5x5x64 convolutions with stride [1  1] and padding [2  2  2  2]
     7   'relu_3'             ReLU                ReLU
     8   'conv_4'             2-D Convolution     32 5x5x64 convolutions with stride [1  1] and padding [2  2  2  2]
     9   'relu_4'             ReLU                ReLU
    10   'conv_5'             2-D Convolution     1 5x5x32 convolutions with stride [1  1] and padding [2  2  2  2]
    11   'regressionoutput'   Regression Output   mean-squared-error with response 'Response'

시뮬레이션용 채널 모델 생성하기

시뮬레이션 잡음 수준을 dB 단위로 설정합니다. 이 예제에서 사용하는 SNR 정의에 대한 설명은 SNR Definition Used in Link Simulations 항목을 참조하십시오.

SNRdB = 10;

PDSCH 파라미터와 DM-RS 구성을 포함하여 미리 정의된 시뮬레이션 파라미터를 불러옵니다.

simParameters = hDeepLearningChanEstSimParameters();
carrier = simParameters.Carrier;
pdsch = simParameters.PDSCH;

TDL 채널 모델을 생성하고 채널 파라미터를 설정합니다. 나중에 이 파라미터를 변경하여 이 추정기의 다양한 채널 응답을 비교할 수 있습니다.

channel = nrTDLChannel;
channel.Seed = 0;
channel.DelayProfile = 'TDL-A';
channel.DelaySpread = 3e-7;
channel.MaximumDopplerShift = 50;

% This example supports only SISO configuration
channel.NumTransmitAntennas = 1;
channel.NumReceiveAntennas = 1;

waveformInfo = nrOFDMInfo(carrier);
channel.SampleRate = waveformInfo.SampleRate;

최대 채널 지연을 구합니다.

chInfo = info(channel);
maxChDelay = chInfo.MaximumChannelDelay;

PDSCH DM-RS 송신 시뮬레이션하기

다음 단계를 수행하여 PDSCH DM-RS 송신을 시뮬레이션합니다.

  • 리소스 그리드 생성

  • DM-RS 심볼 삽입

  • OFDM 변조 수행

  • 채널 모델을 통해 변조된 파형 전송

  • 백색 가우스 잡음 추가

  • 완벽한 타이밍 동기화 수행

  • OFDM 복조 수행

그리드의 DM-RS 심볼은 채널 추정에 사용됩니다. 이 예제는 어떠한 데이터도 송신하지 않으므로 리소스 그리드는 어떤 PDSCH 심볼도 포함하지 않습니다.

% Generate DM-RS indices and symbols
dmrsSymbols = nrPDSCHDMRS(carrier,pdsch);
dmrsIndices = nrPDSCHDMRSIndices(carrier,pdsch);

% Create resource grid
pdschGrid = nrResourceGrid(carrier);

% Map PDSCH DM-RS symbols to the grid
pdschGrid(dmrsIndices) = dmrsSymbols;

% OFDM-modulate associated resource elements
txWaveform = nrOFDMModulate(carrier,pdschGrid);

채널 내용을 플러시하려면 송신된 파형의 맨 끝에 0을 추가합니다. 이러한 0은 다중 경로 및 구현 지연과 같이 채널에 도입되는 지연을 고려하며, 0의 개수는 샘플링 레이트, 지연 프로파일, 지연 확산에 따라 달라집니다.

txWaveform = [txWaveform; zeros(maxChDelay,size(txWaveform,2))];

TDL 채널 모델을 통해 데이터를 전송합니다.

[rxWaveform,pathGains,sampleTimes] = channel(txWaveform);

가산성 백색 가우스 잡음(AWGN)을 수신된 시간 영역 파형에 추가합니다. 샘플링 레이트를 고려하려면 잡음 전력을 정규화합니다. SNR은 각 수신 안테나에 대한 RE(리소스 요소)별로 정의됩니다(3GPP TS 38.101-4). 이 예제에서 사용하는 SNR 정의에 대한 설명은 SNR Definition Used in Link Simulations 항목을 참조하십시오.

SNR = 10^(SNRdB/10); % Calculate linear SNR
N0 = 1/sqrt(2.0*simParameters.NRxAnts*double(waveformInfo.Nfft)*SNR);
noise = N0*complex(randn(size(rxWaveform)),randn(size(rxWaveform)));
rxWaveform = rxWaveform + noise;

완벽한 동기화를 수행합니다. 가장 강력한 다중 경로 성분을 찾기 위해 채널에서 제공하는 정보를 사용합니다.

% Get path filters for perfect channel estimation
pathFilters = getPathFilters(channel);
[offset,~] = nrPerfectTimingEstimate(pathGains,pathFilters);

rxWaveform = rxWaveform(1+offset:end, :);

수신된 데이터를 OFDM 복조하여 리소스 그리드를 재생성합니다.

rxGrid = nrOFDMDemodulate(carrier,rxWaveform);

% Pad the grid with zeros in case an incomplete slot has been demodulated
[K,L,R] = size(rxGrid);
if (L < carrier.SymbolsPerSlot)
    rxGrid = cat(2,rxGrid,zeros(K,carrier.SymbolsPerSlot-L,R));
end

다양한 채널 추정을 비교하고 시각화하기

동일한 채널 모델의 완벽한 추정, 실질적 추정, 신경망 추정을 수행하고 결과를 비교할 수 있습니다.

완벽한 채널 추정을 수행하려면 채널이 제공하는 경로 이득 값을 사용해 nrPerfectChannelEstimate 함수를 사용합니다.

estChannelGridPerfect = nrPerfectChannelEstimate(carrier,pathGains, ...
    pathFilters,offset,sampleTimes);

실질적 채널 추정을 수행하려면 nrChannelEstimate 함수를 사용합니다.

[estChannelGrid,~] = nrChannelEstimate(carrier,rxGrid,dmrsIndices, ...
    dmrsSymbols,'CDMLengths',pdsch.DMRS.CDMLengths);

신경망을 사용하여 채널 추정을 수행하려면 수신된 그리드를 보간해야 합니다. 그런 다음 보간된 영상을 실수부와 허수부로 분할하고 이러한 영상을 신경망에 단일 배치(batch)로 함께 입력합니다. 마지막으로 predict (Deep Learning Toolbox) 함수를 사용하여 실수 영상과 허수 영상을 토대로 예측합니다. 마지막으로 결과를 결합하고 복소수 데이터로 다시 변환합니다.

% Interpolate the received resource grid using pilot symbol locations
interpChannelGrid = hPreprocessInput(rxGrid,dmrsIndices,dmrsSymbols);

% Concatenate the real and imaginary grids along the batch dimension
nnInput = cat(4,real(interpChannelGrid),imag(interpChannelGrid));

% Use the neural network to estimate the channel
estChannelGridNN = predict(channelEstimationCNN,nnInput);

% Convert results to complex
estChannelGridNN = complex(estChannelGridNN(:,:,:,1),estChannelGridNN(:,:,:,2));

각 추정 방법의 MSE(평균 제곱 오차)를 계산합니다.

neural_mse = mean(abs(estChannelGridPerfect(:) - estChannelGridNN(:)).^2);
interp_mse = mean(abs(estChannelGridPerfect(:) - interpChannelGrid(:)).^2);
practical_mse = mean(abs(estChannelGridPerfect(:) - estChannelGrid(:)).^2);

개별 채널 추정값과 채널 필터 탭에서 얻은 실제 채널 구현을 플로팅합니다. 실질적 추정기와 신경망 추정기 모두 선형 보간보다 성능이 뛰어납니다.

plotChEstimates(interpChannelGrid,estChannelGrid,estChannelGridNN,estChannelGridPerfect,...
    interp_mse,practical_mse,neural_mse);

참고 문헌

  1. van de Beek, Jan–Jaap, Ove Edfors, Magnus Sandell, Sarah Kate Wilson, and Per Ola Borjesson. “On Channel Estimation in OFDM Systems.” In 1995 IEEE 45th Vehicular Technology Conference. Countdown to the Wireless Twenty–First Century, 2:815–19, July 1995.

  2. Ye, Hao, Geoffrey Ye Li, and Biing-Hwang Juang. “Power of Deep Learning for Channel Estimation and Signal Detection in OFDM Systems.” IEEE Wireless Communications Letters 7, no. 1 (February 2018): 114–17.

  3. Soltani, Mehran, Vahid Pourahmadi, Ali Mirzaei, and Hamid Sheikhzadeh. “Deep Learning–Based Channel Estimation.” Preprint, submitted October 13, 2018.

로컬 함수

function hest = hPreprocessInput(rxGrid,dmrsIndices,dmrsSymbols)
% Perform linear interpolation of the grid and input the result to the
% neural network This helper function extracts the DM-RS symbols from
% dmrsIndices locations in the received grid rxGrid and performs linear
% interpolation on the extracted pilots.

    % Obtain pilot symbol estimates
    dmrsRx = rxGrid(dmrsIndices);
    dmrsEsts = dmrsRx .* conj(dmrsSymbols);

    % Create empty grids to fill after linear interpolation
    [rxDMRSGrid, hest] = deal(zeros(size(rxGrid)));
    rxDMRSGrid(dmrsIndices) = dmrsSymbols;

    % Find the row and column coordinates for a given DMRS configuration
    [rows,cols] = find(rxDMRSGrid ~= 0);
    dmrsSubs = [rows,cols,ones(size(cols))];
    [l_hest,k_hest] = meshgrid(1:size(hest,2),1:size(hest,1));

    % Perform linear interpolation
    f = scatteredInterpolant(dmrsSubs(:,2),dmrsSubs(:,1),dmrsEsts);
    hest = f(l_hest,k_hest);

end

function [trainData,trainLabels] = hGenerateTrainingData(dataSize)
% Generate training data examples for channel estimation. Run dataSize
% number of iterations to create random channel configurations and pass an
% OFDM-modulated fixed resource grid with only the DM-RS symbols inserted.
% Perform perfect timing synchronization and OFDM demodulation, extracting
% the pilot symbols and performing linear interpolation at each iteration.
% Use perfect channel information to create the label data. The function
% returns 2 arrays - the training data and labels.

    fprintf('Starting data generation...\n')

    % List of possible channel profiles
    delayProfiles = {'TDL-A', 'TDL-B', 'TDL-C', 'TDL-D', 'TDL-E'};

    simParameters = hDeepLearningChanEstSimParameters();
    carrier = simParameters.Carrier;
    pdsch = simParameters.PDSCH;

    % Create the channel model object
    nTxAnts = simParameters.NTxAnts;
    nRxAnts = simParameters.NRxAnts;

    channel = nrTDLChannel; % TDL channel object
    channel.NumTransmitAntennas = nTxAnts;
    channel.NumReceiveAntennas = nRxAnts;

    % Use the value returned from <matlab:edit('nrOFDMInfo') nrOFDMInfo> to
    % set the channel model sample rate
    waveformInfo = nrOFDMInfo(carrier);
    channel.SampleRate = waveformInfo.SampleRate;

    % Get the maximum channel delay.
    chInfo = info(channel);
    maxChDelay = chInfo.MaximumChannelDelay;

    % Return DM-RS indices and symbols
    dmrsSymbols = nrPDSCHDMRS(carrier,pdsch);
    dmrsIndices = nrPDSCHDMRSIndices(carrier,pdsch);

    % Create resource grid
    grid = nrResourceGrid(carrier,nTxAnts);

    % PDSCH DM-RS precoding and mapping
    [~,dmrsAntIndices] = nrExtractResources(dmrsIndices,grid);
    grid(dmrsAntIndices) = dmrsSymbols;

    % OFDM modulation of associated resource elements
    txWaveform_original = nrOFDMModulate(carrier,grid);

    % Acquire linear interpolator coordinates for neural net preprocessing
    [rows,cols] = find(grid ~= 0);
    dmrsSubs = [rows, cols, ones(size(cols))];
    hest = zeros(size(grid));
    [l_hest,k_hest] = meshgrid(1:size(hest,2),1:size(hest,1));

    % Preallocate memory for the training data and labels
    numExamples = dataSize;
    [trainData, trainLabels] = deal(zeros([612 14 2 numExamples]));

    % Main loop for data generation, iterating over the number of examples
    % specified in the function call. Each iteration of the loop produces a
    % new channel realization with a random delay spread, doppler shift,
    % and delay profile. Every perturbed version of the transmitted
    % waveform with the DM-RS symbols is stored in trainData, and the
    % perfect channel realization in trainLabels.
    for i = 1:numExamples
        % Release the channel to change nontunable properties
        channel.release

        % Pick a random seed to create different channel realizations
        channel.Seed = randi([1001 2000]);

        % Pick a random delay profile, delay spread, and maximum doppler shift
        channel.DelayProfile = string(delayProfiles(randi([1 numel(delayProfiles)])));
        channel.DelaySpread = randi([1 300])*1e-9;
        channel.MaximumDopplerShift = randi([5 400]);

        % Send data through the channel model. Append zeros at the end of
        % the transmitted waveform to flush channel content. These zeros
        % take into account any delay introduced in the channel, such as
        % multipath delay and implementation delay. This value depends on
        % the sampling rate, delay profile, and delay spread
        txWaveform = [txWaveform_original; zeros(maxChDelay, size(txWaveform_original,2))];
        [rxWaveform,pathGains,sampleTimes] = channel(txWaveform);

        % Add additive white Gaussian noise (AWGN) to the received time-domain
        % waveform. To take into account sampling rate, normalize the noise power.
        % The SNR is defined per RE for each receive antenna (3GPP TS 38.101-4).
        SNRdB = randi([0 10]);  % Random SNR values between 0 and 10 dB
        SNR = 10^(SNRdB/10);    % Calculate linear SNR
        N0 = 1/sqrt(2.0*nRxAnts*double(waveformInfo.Nfft)*SNR);
        noise = N0*complex(randn(size(rxWaveform)),randn(size(rxWaveform)));
        rxWaveform = rxWaveform + noise;

        % Perfect synchronization. Use information provided by the channel
        % to find the strongest multipath component
        pathFilters = getPathFilters(channel); % Get path filters for perfect channel estimation
        [offset,~] = nrPerfectTimingEstimate(pathGains,pathFilters);

        rxWaveform = rxWaveform(1+offset:end, :);

        % Perform OFDM demodulation on the received data to recreate the
        % resource grid, including padding in case practical
        % synchronization results in an incomplete slot being demodulated
        rxGrid = nrOFDMDemodulate(carrier,rxWaveform);
        [K,L,R] = size(rxGrid);
        if (L < carrier.SymbolsPerSlot)
            rxGrid = cat(2,rxGrid,zeros(K,carrier.SymbolsPerSlot-L,R));
        end

        % Perfect channel estimation, using the value of the path gains
        % provided by the channel. This channel estimate does not
        % include the effect of transmitter precoding
        estChannelGridPerfect = nrPerfectChannelEstimate(carrier,pathGains, ...
            pathFilters,offset,sampleTimes);

        % Linear interpolation
        dmrsRx = rxGrid(dmrsIndices);
        dmrsEsts = dmrsRx .* conj(dmrsSymbols);
        f = scatteredInterpolant(dmrsSubs(:,2),dmrsSubs(:,1),dmrsEsts);
        hest = f(l_hest,k_hest);

        % Split interpolated grid into real and imaginary components and
        % concatenate them along the third dimension, as well as for the
        % true channel response
        rx_grid = cat(3, real(hest), imag(hest));
        est_grid = cat(3, real(estChannelGridPerfect), ...
            imag(estChannelGridPerfect));

        % Add generated training example and label to the respective arrays
        trainData(:,:,:,i) = rx_grid;
        trainLabels(:,:,:,i) = est_grid;

        % Data generation tracker
        if mod(i,round(numExamples/25)) == 0
            fprintf('%3.2f%% complete\n',i/numExamples*100);
        end
    end
    fprintf('Data generation complete!\n')
end

function simParameters = hDeepLearningChanEstSimParameters()
% Set simulation parameters for Deep Learning Data Synthesis for 5G Channel Estimation example

    % Carrier configuration
    simParameters.Carrier = nrCarrierConfig;
    simParameters.Carrier.NSizeGrid = 51;            % Bandwidth in number of resource blocks (51 RBs at 30 kHz SCS for 20 MHz BW)
    simParameters.Carrier.SubcarrierSpacing = 30;    % 15, 30, 60, 120, 240 (kHz)
    simParameters.Carrier.CyclicPrefix = 'Normal';   % 'Normal' or 'Extended' (Extended CP is relevant for 60 kHz SCS only)
    simParameters.Carrier.NCellID = 2;               % Cell identity

    % Number of transmit and receive antennas
    simParameters.NTxAnts = 1;                      % Number of PDSCH transmission antennas
    simParameters.NRxAnts = 1;                      % Number of UE receive antennas

    % PDSCH and DM-RS configuration
    simParameters.PDSCH = nrPDSCHConfig;
    simParameters.PDSCH.PRBSet = 0:simParameters.Carrier.NSizeGrid-1; % PDSCH PRB allocation
    simParameters.PDSCH.SymbolAllocation = [0, simParameters.Carrier.SymbolsPerSlot];           % PDSCH symbol allocation in each slot
    simParameters.PDSCH.MappingType = 'A';     % PDSCH mapping type ('A'(slot-wise),'B'(non slot-wise))
    simParameters.PDSCH.NID = simParameters.Carrier.NCellID;
    simParameters.PDSCH.RNTI = 1;
    simParameters.PDSCH.VRBToPRBInterleaving = 0; % Disable interleaved resource mapping
    simParameters.PDSCH.NumLayers = 1;            % Number of PDSCH transmission layers
    simParameters.PDSCH.Modulation = '16QAM';                       % 'QPSK', '16QAM', '64QAM', '256QAM'

    % DM-RS configuration
    simParameters.PDSCH.DMRS.DMRSPortSet = 0:simParameters.PDSCH.NumLayers-1; % DM-RS ports to use for the layers
    simParameters.PDSCH.DMRS.DMRSTypeAPosition = 2;      % Mapping type A only. First DM-RS symbol position (2,3)
    simParameters.PDSCH.DMRS.DMRSLength = 1;             % Number of front-loaded DM-RS symbols (1(single symbol),2(double symbol))
    simParameters.PDSCH.DMRS.DMRSAdditionalPosition = 1; % Additional DM-RS symbol positions (max range 0...3)
    simParameters.PDSCH.DMRS.DMRSConfigurationType = 2;  % DM-RS configuration type (1,2)
    simParameters.PDSCH.DMRS.NumCDMGroupsWithoutData = 1;% Number of CDM groups without data
    simParameters.PDSCH.DMRS.NIDNSCID = 1;               % Scrambling identity (0...65535)
    simParameters.PDSCH.DMRS.NSCID = 0;                  % Scrambling initialization (0,1)
end

function plotChEstimates(interpChannelGrid,estChannelGrid,estChannelGridNN,estChannelGridPerfect,...
                         interp_mse,practical_mse,neural_mse)
% Plot the different channel estimates and display the measured MSE

    figure;
    cmax = max(abs([estChannelGrid(:); estChannelGridNN(:); estChannelGridPerfect(:)]));

    subplot(1,4,1)
    imagesc(abs(interpChannelGrid));
    xlabel('OFDM Symbol');
    ylabel('Subcarrier');
    title({'Linear Interpolation', ['MSE: ', num2str(interp_mse)]});
    clim([0 cmax]);

    subplot(1,4,2)
    imagesc(abs(estChannelGrid));
    xlabel('OFDM Symbol');
    ylabel('Subcarrier');
    title({'Practical Estimator', ['MSE: ', num2str(practical_mse)]});
    clim([0 cmax]);

    subplot(1,4,3)
    imagesc(abs(estChannelGridNN));
    xlabel('OFDM Symbol');
    ylabel('Subcarrier');
    title({'Neural Network', ['MSE: ', num2str(neural_mse)]});
    clim([0 cmax]);

    subplot(1,4,4)
    imagesc(abs(estChannelGridPerfect));
    xlabel('OFDM Symbol');
    ylabel('Subcarrier');
    title({'Actual Channel'});
    clim([0 cmax]);

end

참고 항목

함수

관련 항목