В этом примере показано, как Toolbox™ LTE может использоваться для полной синхронизации, демодуляции и декодирования активного сигнала eNireB. Прежде чем пользовательское оборудование (UE) сможет взаимодействовать с сетью, оно должно выполнить процедуры поиска и выбора соты и получить начальную системную информацию. Это включает в себя получение синхронизации слота и кадра, поиск идентификатора соты и декодирование главного информационного блока (MIB) и блоков системной информации (SIB). Этот пример демонстрирует этот процесс и декодирует MIB и SIB1, первый из блоков системной информации. Для декодирования MIB и SIB1 требуется комплексный приемник, способный демодулировать и декодировать большинство каналов и сигналов нисходящей линии связи.
Для связи с сетью UE должно получить некоторую базовую системную информацию. Это осуществляется MIB и SIB. MIB содержит наиболее важную системную информацию:
Пропускная способность системы
Номер системного кадра (SFN)
Конфигурация канала индикатора физического гибридного автоматического запроса на повторение (HARQ) (PHICH)
MIB передается по широковещательному каналу (BCH), преобразованному в физический широковещательный канал (PBCH). Это передается с фиксированной схемой кодирования и модуляции и может быть декодировано после начальной процедуры поиска соты. С помощью информации, полученной из MIB, UE теперь может декодировать индикатор формата управления (CFI), который указывает длину физического канала управления нисходящей линии связи (PDCCH). Это позволяет декодировать PDCCH и искать сообщения управляющей информации нисходящей линии связи (DCI). Сообщение DCI CRC, замаскированное временным идентификатором сети радиосвязи с системной информацией (SI-RNTI), указывает, что SIB переносится в одном и том же подкадре. SIB передаются в логическом канале широковещательного канала управления (BCCH). Обычно сообщения BCCH передаются по совместно используемому каналу нисходящей линии связи (DL-SCH) и передаются по физическому совместно используемому каналу нисходящей линии связи (PDSCH). Формат и распределение ресурсов передачи PDSCH указывается сообщением DCI на PDCCH.
Этот пример декодирует MIB и SystemInformationBlockType1 (SIB1). Последний передается для определения планирования другой системной информации вместе с аспектами идентификации соты, такими как идентификация наземной мобильной сети общего пользования (PLMN). Хотя SIB1 передается в фиксированном расписании времени, распределение ресурсов несущей SIB1 PDSCH является динамическим и указывается в ассоциированном сообщении DCI.
MATLAB ® может использоваться для получения данных ввода/вывода из широкого спектра приборов с помощью Toolbox™ управления приборами. В этом примере используется захват I/Q одной антенны eNireB с двумя передающими антеннами. Захват выполняется со скоростью 15,36 Мс/с, достаточной для правильной выборки всех допустимых полос пропускания eNireB до 10 МГц: 1,4 МГц, 3 МГц, 5 МГц, 10 МГц. Захваченные данные хранятся в файле eNireBOutput.mat.
Альтернативно, подходящий сигнал LTE может быть сгенерирован с использованием LTE Toolbox. Этим можно управлять с помощью переменной loadFromFile.
loadFromFile = 1; % Set to 0 to generate the eNodeB output locally
MIB соответствует одному транспортному блоку BCH. Интервал времени передачи BCH (TTI) или время, необходимое для передачи одного транспортного блока, составляет 40 мс или 4 кадра. BCH передается в 4 частях, каждая часть отображается на первый подкадр (подкадр 0) кадра, и возможно, что каждая передача независимо декодируется в зависимости от условий сигнала. Чтобы гарантировать, что субкадр 0 принят, захват должен иметь длину, по меньшей мере, 11 подкадров, чтобы учесть возможность того, что захват начинается во время субкадра 0. Для плохих условий сигнала могут потребоваться все 4 части TTI, и в этом случае захват должен иметь длину по меньшей мере 41 подкадра. Аналогичная ситуация относится и к SIB1; он передается в подкадре 5 каждого четного кадра, причем четыре различные версии избыточности (RV) передаются последовательно, давая общий период 80 мс или 8 кадров. Поэтому 21 подкадр захвата требуется для обеспечения приема одного RV SIB1 (в подкадре 5 четного кадра), но до 81 подкадра захвата требуется, если условия сигнала таковы, что все RV должны быть объединены.
if loadFromFile load eNodeBOutput.mat % Load I/Q capture of eNodeB output eNodeBOutput = double(eNodeBOutput)/32768; % Scale samples sr = 15.36e6; % Sampling rate for loaded samples else rmc = lteRMCDL('R.3'); %#ok<UNRCH> rmc.NCellID = 17; rmc.TotSubframes = 41; rmc.PDSCH.RNTI = 61; % SIB parameters rmc.SIB.Enable = 'On'; rmc.SIB.DCIFormat = 'Format1A'; rmc.SIB.AllocationType = 0; rmc.SIB.VRBStart = 8; rmc.SIB.VRBLength = 8; rmc.SIB.Gap = 0; % SIB data field filled with random bits, this is not a valid SIB % message rmc.SIB.Data = randi([0 1],176,1); [eNodeBOutput,~,info] = lteRMCDLTool(rmc,[1;0;0;1]); sr = info.SamplingRate; % Sampling rate of generated samples end
До декодирования MIB UE не знает полную полосу пропускания системы. Все первичные и вторичные сигналы синхронизации (PSS и SSS) и PBCH (содержащий MIB) лежат в центральных 72 поднесущих (6 ресурсных блоков) полосы пропускания системы, что позволяет UE первоначально демодулировать только эту центральную область. Поэтому полоса пропускания первоначально устанавливается равной 6 блокам ресурсов. Форма сигнала I/Q должна быть повторно дискретизирована соответствующим образом. На этом этапе также отображается спектр входного сигнала eNodeBOutput.
% Set up some housekeeping variables: % separator for command window logging separator = repmat('-',1,50); % plots if (~exist('channelFigure','var') || ~isvalid(channelFigure)) channelFigure = figure('Visible','off'); end [spectrumAnalyzer,synchCorrPlot,pdcchConstDiagram] = ... hSIB1RecoveryExamplePlots(channelFigure,sr); % PDSCH EVM pdschEVM = comm.EVM(); pdschEVM.MaximumEVMOutputPort = true; % The sampling rate for the initial cell search is established using % lteOFDMInfo configured for 6 resource blocks. enb.CyclicPrefix is set % temporarily in the call to lteOFDMInfo to suppress a default value % warning (it does not affect the sampling rate). enb = struct; % eNodeB config structure enb.NDLRB = 6; % Number of resource blocks ofdmInfo = lteOFDMInfo(setfield(enb,'CyclicPrefix','Normal')); %#ok<SFLD> if (isempty(eNodeBOutput)) fprintf('\nReceived signal must not be empty.\n'); return; end % Display received signal spectrum fprintf('\nPlotting received signal spectrum...\n'); spectrumAnalyzer(awgn(eNodeBOutput, 100.0)); if (sr~=ofdmInfo.SamplingRate) if (sr < ofdmInfo.SamplingRate) warning('The received signal sampling rate (%0.3fMs/s) is lower than the desired sampling rate for cell search / MIB decoding (%0.3fMs/s); cell search / MIB decoding may fail.',sr/1e6,ofdmInfo.SamplingRate/1e6); end fprintf('\nResampling from %0.3fMs/s to %0.3fMs/s for cell search / MIB decoding...\n',sr/1e6,ofdmInfo.SamplingRate/1e6); else fprintf('\nResampling not required; received signal is at desired sampling rate for cell search / MIB decoding (%0.3fMs/s).\n',sr/1e6); end % Downsample received signal nSamples = ceil(ofdmInfo.SamplingRate/round(sr)*size(eNodeBOutput,1)); nRxAnts = size(eNodeBOutput, 2); downsampled = zeros(nSamples, nRxAnts); for i=1:nRxAnts downsampled(:,i) = resample(eNodeBOutput(:,i), ofdmInfo.SamplingRate, round(sr)); end
Plotting received signal spectrum... Resampling from 15.360Ms/s to 1.920Ms/s for cell search / MIB decoding...

Звонить lteCellSearch для получения идентификатора соты и временного смещения offset к первой рамной головке. Поиск ячейки повторяется для каждой комбинации длины циклического префикса и дуплексного режима, и комбинация с наиболее сильной корреляцией позволяет идентифицировать эти параметры. Формируется график корреляции между принятым сигналом и PSS/SSS для идентичности обнаруженной соты. PSS обнаруживается с помощью корреляции временной области, а SSS - с помощью корреляции частотной области. До обнаружения SSS выполняют оценку/коррекцию сдвига частоты с использованием корреляции циклического префикса. Обнаружение PSS во временной области устойчиво к малым частотным смещениям, но большие смещения могут ухудшить корреляцию PSS.
fprintf('\nPerforming cell search...\n'); % Set up duplex mode and cyclic prefix length combinations for search; if % either of these parameters is configured in |enb| then the value is % assumed to be correct if (~isfield(enb,'DuplexMode')) duplexModes = {'TDD' 'FDD'}; else duplexModes = {enb.DuplexMode}; end if (~isfield(enb,'CyclicPrefix')) cyclicPrefixes = {'Normal' 'Extended'}; else cyclicPrefixes = {enb.CyclicPrefix}; end % Perform cell search across duplex mode and cyclic prefix length % combinations and record the combination with the maximum correlation; if % multiple cell search is configured, this example will decode the first % (strongest) detected cell searchalg.MaxCellCount = 1; searchalg.SSSDetection = 'PostFFT'; peakMax = -Inf; for duplexMode = duplexModes for cyclicPrefix = cyclicPrefixes enb.DuplexMode = duplexMode{1}; enb.CyclicPrefix = cyclicPrefix{1}; [enb.NCellID, offset, peak] = lteCellSearch(enb, downsampled, searchalg); enb.NCellID = enb.NCellID(1); offset = offset(1); peak = peak(1); if (peak>peakMax) enbMax = enb; offsetMax = offset; peakMax = peak; end end end % Use the cell identity, cyclic prefix length, duplex mode and timing % offset which gave the maximum correlation during cell search enb = enbMax; offset = offsetMax; % Compute the correlation for each of the three possible primary cell % identities; the peak of the correlation for the cell identity established % above is compared with the peak of the correlation for the other two % primary cell identities in order to establish the quality of the % correlation. corr = cell(1,3); idGroup = floor(enbMax.NCellID/3); for i = 0:2 enb.NCellID = idGroup*3 + mod(enbMax.NCellID + i,3); [~,corr{i+1}] = lteDLFrameOffset(enb, downsampled); corr{i+1} = sum(corr{i+1},2); end threshold = 1.3 * max([corr{2}; corr{3}]); % multiplier of 1.3 empirically obtained if (max(corr{1})<threshold) warning('Synchronization signal correlation was weak; detected cell identity may be incorrect.'); end % Return to originally detected cell identity enb.NCellID = enbMax.NCellID; % Plot PSS/SSS correlation and threshold synchCorrPlot.YLimits = [0 max([corr{1}; threshold])*1.1]; synchCorrPlot([corr{1} threshold*ones(size(corr{1}))]); % Perform timing synchronization fprintf('Timing offset to frame start: %d samples\n',offset); downsampled = downsampled(1+offset:end,:); enb.NSubframe = 0; % Show cell-wide settings fprintf('Cell-wide settings after cell search:\n'); disp(enb);
Performing cell search...
Timing offset to frame start: 481 samples
Cell-wide settings after cell search:
NDLRB: 6
DuplexMode: 'FDD'
CyclicPrefix: 'Normal'
NCellID: 17
NSubframe: 0

Перед демодуляцией OFDM любой значительный сдвиг частоты должен быть удален. Сдвиг частоты в сигнале I/Q оценивается и корректируется с использованием lteFrequencyOffset и lteFrequencyCorrect. Сдвиг частоты оценивается посредством корреляции циклического префикса и, следовательно, может оценивать смещения до +/- половины расстояния между поднесущими, т.е. +/- 7.5kHz.
fprintf('\nPerforming frequency offset estimation...\n'); % For TDD, TDDConfig and SSC are defaulted to 0. These parameters are not % established in the system until SIB1 is decoded, so at this stage the % values of 0 make the most conservative assumption (fewest downlink % subframes and shortest special subframe). if (strcmpi(enb.DuplexMode,'TDD')) enb.TDDConfig = 0; enb.SSC = 0; end delta_f = lteFrequencyOffset(enb, downsampled); fprintf('Frequency offset: %0.3fHz\n',delta_f); downsampled = lteFrequencyCorrect(enb, downsampled, delta_f);
Performing frequency offset estimation... Frequency offset: -14.902Hz
Сигнал I/Q с пониженной дискретизацией OFDM демодулируется для получения сетки ресурсов. rxgrid. Это используется для выполнения оценки канала. hest - оценка канала, nest - оценка шума (для выравнивания MMSE) и cec - конфигурация блока оценки канала.
Для оценки канала в примере предполагается 4 опорных сигнала, специфичных для соты. Это означает, что оценки канала для каждой приемной антенны из всех возможных портов опорного сигнала, специфичных для соты, доступны. Истинное количество портов опорного сигнала для конкретной соты еще не известно. Оценка канала выполняется только на первом подкадре, т.е. с использованием первого L Символы OFDM в rxgrid.
Консервативное окно усреднения пилот-сигнала 13 на 9 используется по частоте и времени для уменьшения влияния шума на оценки пилот-сигнала во время оценки канала.
% Channel estimator configuration cec.PilotAverage = 'UserDefined'; % Type of pilot averaging cec.FreqWindow = 13; % Frequency window size cec.TimeWindow = 9; % Time window size cec.InterpType = 'cubic'; % 2D interpolation type cec.InterpWindow = 'Centered'; % Interpolation window type cec.InterpWinSize = 1; % Interpolation window size % Assume 4 cell-specific reference signals for initial decoding attempt; % ensures channel estimates are available for all cell-specific reference % signals enb.CellRefP = 4; fprintf('Performing OFDM demodulation...\n\n'); griddims = lteResourceGridSize(enb); % Resource grid dimensions L = griddims(2); % Number of OFDM symbols in a subframe % OFDM demodulate signal rxgrid = lteOFDMDemodulate(enb, downsampled); if (isempty(rxgrid)) fprintf('After timing synchronization, signal is shorter than one subframe so no further demodulation will be performed.\n'); return; end % Perform channel estimation [hest, nest] = lteDLChannelEstimate(enb, cec, rxgrid(:,1:L,:));
Performing OFDM demodulation...
MIB теперь декодируется вместе с количеством портов опорного сигнала, специфичного для соты, передаваемых как маска по ЦИК ВСН. Функция ltePBCHDecode устанавливает тайминг кадра по модулю 4 и возвращает его в nfmod4 параметр. Он также возвращает биты MIB в векторе mib и истинное количество портов опорного сигнала, специфичных для соты, которое назначено в enb.CellRefP на выходе этого вызова функции. Если количество портов опорного сигнала, специфичных для соты, декодируется как enb.CellRefP=0, это указывает на отказ декодирования BCH. Функция lteMIB используется для синтаксического анализа битового вектора mib и добавьте соответствующие поля в структуру конфигурации enb. После декодирования MIB обнаруженная полоса пропускания присутствует в enb.NDLRB.
% Decode the MIB % Extract resource elements (REs) corresponding to the PBCH from the first % subframe across all receive antennas and channel estimates fprintf('Performing MIB decoding...\n'); pbchIndices = ltePBCHIndices(enb); [pbchRx, pbchHest] = lteExtractResources( ... pbchIndices, rxgrid(:,1:L,:), hest(:,1:L,:,:)); % Decode PBCH [bchBits, pbchSymbols, nfmod4, mib, enb.CellRefP] = ltePBCHDecode( ... enb, pbchRx, pbchHest, nest); % Parse MIB bits enb = lteMIB(mib, enb); % Incorporate the nfmod4 value output from the function ltePBCHDecode, as % the NFrame value established from the MIB is the System Frame Number % (SFN) modulo 4 (it is stored in the MIB as floor(SFN/4)) enb.NFrame = enb.NFrame+nfmod4; % Display cell wide settings after MIB decoding fprintf('Cell-wide settings after MIB decoding:\n'); disp(enb); if (enb.CellRefP==0) fprintf('MIB decoding failed (enb.CellRefP=0).\n\n'); return; end if (enb.NDLRB==0) fprintf('MIB decoding failed (enb.NDLRB=0).\n\n'); return; end
Performing MIB decoding...
Cell-wide settings after MIB decoding:
NDLRB: 50
DuplexMode: 'FDD'
CyclicPrefix: 'Normal'
NCellID: 17
NSubframe: 0
CellRefP: 2
PHICHDuration: 'Normal'
Ng: 'One'
NFrame: 406
Теперь, когда полоса пропускания сигнала известна, сигнал повторно дискретизируется до номинальной частоты дискретизации, используемой LTE Toolbox для этой полосы пропускания (см. lteOFDMModulate для получения подробной информации). Оценку и коррекцию сдвига частоты осуществляют по повторно дискретизированному сигналу. Затем выполняются синхронизация синхронизации и демодуляция OFDM.
fprintf('Restarting reception now that bandwidth (NDLRB=%d) is known...\n',enb.NDLRB); % Resample now we know the true bandwidth ofdmInfo = lteOFDMInfo(enb); if (sr~=ofdmInfo.SamplingRate) if (sr < ofdmInfo.SamplingRate) warning('The received signal sampling rate (%0.3fMs/s) is lower than the desired sampling rate for NDLRB=%d (%0.3fMs/s); PDCCH search / SIB1 decoding may fail.',sr/1e6,enb.NDLRB,ofdmInfo.SamplingRate/1e6); end fprintf('\nResampling from %0.3fMs/s to %0.3fMs/s...\n',sr/1e6,ofdmInfo.SamplingRate/1e6); else fprintf('\nResampling not required; received signal is at desired sampling rate for NDLRB=%d (%0.3fMs/s).\n',enb.NDLRB,sr/1e6); end nSamples = ceil(ofdmInfo.SamplingRate/round(sr)*size(eNodeBOutput,1)); resampled = zeros(nSamples, nRxAnts); for i = 1:nRxAnts resampled(:,i) = resample(eNodeBOutput(:,i), ofdmInfo.SamplingRate, round(sr)); end % Perform frequency offset estimation and correction fprintf('\nPerforming frequency offset estimation...\n'); delta_f = lteFrequencyOffset(enb, resampled); fprintf('Frequency offset: %0.3fHz\n',delta_f); resampled = lteFrequencyCorrect(enb, resampled, delta_f); % Find beginning of frame fprintf('\nPerforming timing offset estimation...\n'); offset = lteDLFrameOffset(enb, resampled); fprintf('Timing offset to frame start: %d samples\n',offset); % Aligning signal with the start of the frame resampled = resampled(1+offset:end,:); % OFDM demodulation fprintf('\nPerforming OFDM demodulation...\n\n'); rxgrid = lteOFDMDemodulate(enb, resampled);
Restarting reception now that bandwidth (NDLRB=50) is known... Resampling not required; received signal is at desired sampling rate for NDLRB=50 (15.360Ms/s). Performing frequency offset estimation... Frequency offset: 5.221Hz Performing timing offset estimation... Timing offset to frame start: 3848 samples Performing OFDM demodulation...
В этом разделе выполняются следующие шаги:
Демодуляция канала индикатора физического формата управления (PCFICH), декодирование CFI
Декодирование PDCCH
Слепой поиск PDCCH
Восстановление битов SIB: демодуляция PDSCH и декодирование DL-SCH
Буферизация и сброс состояния DL-SCH HARQ
После восстановления CRC SIB должен быть равен 0.
Эти этапы декодирования выполняются в цикле для каждого появления подкадра, несущего SIB1 в принятом сигнале. Как упоминалось выше, SIB1 передается в подкадре 5 каждого четного кадра, поэтому входной сигнал сначала проверяется, чтобы установить, что присутствует, по меньшей мере, одно появление SIB1. Для каждого SIB1 подкадра строят график отклика на величину оценки канала, как и для совокупности принятого PDCCH.
% Check this frame contains SIB1, if not advance by 1 frame provided we % have enough data, terminate otherwise. if (mod(enb.NFrame,2)~=0) if (size(rxgrid,2)>=(L*10)) rxgrid(:,1:(L*10),:) = []; fprintf('Skipping frame %d (odd frame number does not contain SIB1).\n\n',enb.NFrame); else rxgrid = []; end enb.NFrame = enb.NFrame + 1; end % Advance to subframe 5, or terminate if we have less than 5 subframes if (size(rxgrid,2)>=(L*5)) rxgrid(:,1:(L*5),:) = []; % Remove subframes 0 to 4 else rxgrid = []; end enb.NSubframe = 5; if (isempty(rxgrid)) fprintf('Received signal does not contain a subframe carrying SIB1.\n\n'); end % Reset the HARQ buffers decState = []; % While we have more data left, attempt to decode SIB1 while (size(rxgrid,2) > 0) fprintf('%s\n',separator); fprintf('SIB1 decoding for frame %d\n',mod(enb.NFrame,1024)); fprintf('%s\n\n',separator); % Reset the HARQ buffer with each new set of 8 frames as the SIB1 % info may be different if (mod(enb.NFrame,8)==0) fprintf('Resetting HARQ buffers.\n\n'); decState = []; end % Extract current subframe rxsubframe = rxgrid(:,1:L,:); % Perform channel estimation [hest,nest] = lteDLChannelEstimate(enb, cec, rxsubframe); % PCFICH demodulation, CFI decoding. The CFI is now demodulated and % decoded using similar resource extraction and decode functions to % those shown already for BCH reception. lteExtractResources is used to % extract REs corresponding to the PCFICH from the received subframe % rxsubframe and channel estimate hest. fprintf('Decoding CFI...\n\n'); pcfichIndices = ltePCFICHIndices(enb); % Get PCFICH indices [pcfichRx, pcfichHest] = lteExtractResources(pcfichIndices, rxsubframe, hest); % Decode PCFICH cfiBits = ltePCFICHDecode(enb, pcfichRx, pcfichHest, nest); cfi = lteCFIDecode(cfiBits); % Get CFI if (isfield(enb,'CFI') && cfi~=enb.CFI) release(pdcchConstDiagram); end enb.CFI = cfi; fprintf('Decoded CFI value: %d\n\n', enb.CFI); % For TDD, the PDCCH must be decoded blindly across possible values of % the PHICH configuration factor m_i (0,1,2) in TS36.211 Table 6.9-1. % Values of m_i = 0, 1 and 2 can be achieved by configuring TDD % uplink-downlink configurations 1, 6 and 0 respectively. if (strcmpi(enb.DuplexMode,'TDD')) tddConfigs = [1 6 0]; else tddConfigs = 0; % not used for FDD, only used to control while loop end alldci = {}; while (isempty(alldci) && ~isempty(tddConfigs)) % Configure TDD uplink-downlink configuration if (strcmpi(enb.DuplexMode,'TDD')) enb.TDDConfig = tddConfigs(1); end tddConfigs(1) = []; % PDCCH demodulation. The PDCCH is now demodulated and decoded % using similar resource extraction and decode functions to those % shown already for BCH and CFI reception pdcchIndices = ltePDCCHIndices(enb); % Get PDCCH indices [pdcchRx, pdcchHest] = lteExtractResources(pdcchIndices, rxsubframe, hest); % Decode PDCCH and plot constellation [dciBits, pdcchSymbols] = ltePDCCHDecode(enb, pdcchRx, pdcchHest, nest); pdcchConstDiagram(pdcchSymbols); % PDCCH blind search for System Information (SI) and DCI decoding. % The LTE Toolbox provides full blind search of the PDCCH to find % any DCI messages with a specified RNTI, in this case the SI-RNTI. fprintf('PDCCH search for SI-RNTI...\n\n'); pdcch = struct('RNTI', 65535); pdcch.ControlChannelType = 'PDCCH'; pdcch.EnableCarrierIndication = 'Off'; pdcch.SearchSpace = 'Common'; pdcch.EnableMultipleCSIRequest = 'Off'; pdcch.EnableSRSRequest = 'Off'; pdcch.NTxAnts = 1; alldci = ltePDCCHSearch(enb, pdcch, dciBits); % Search PDCCH for DCI end % If DCI was decoded, proceed with decoding PDSCH / DL-SCH for i = 1:numel(alldci) dci = alldci{i}; fprintf('DCI message with SI-RNTI:\n'); disp(dci); % Get the PDSCH configuration from the DCI [pdsch, trblklen] = hPDSCHConfiguration(enb, dci, pdcch.RNTI); % If a PDSCH configuration was created, proceed with decoding PDSCH % / DL-SCH if ~isempty(pdsch) pdsch.NTurboDecIts = 5; fprintf('PDSCH settings after DCI decoding:\n'); disp(pdsch); % PDSCH demodulation and DL-SCH decoding to recover SIB bits. % The DCI message is now parsed to give the configuration of % the corresponding PDSCH carrying SIB1, the PDSCH is % demodulated and finally the received bits are DL-SCH decoded % to yield the SIB1 bits. fprintf('Decoding SIB1...\n\n'); % Get PDSCH indices [pdschIndices,pdschIndicesInfo] = ltePDSCHIndices(enb, pdsch, pdsch.PRBSet); [pdschRx, pdschHest] = lteExtractResources(pdschIndices, rxsubframe, hest); % Decode PDSCH [dlschBits,pdschSymbols] = ltePDSCHDecode(enb, pdsch, pdschRx, pdschHest, nest); % Decode DL-SCH with soft buffer input/output for HARQ combining if ~isempty(decState) fprintf('Recombining with previous transmission.\n\n'); end [sib1, crc, decState] = lteDLSCHDecode(enb, pdsch, trblklen, dlschBits, decState); % Compute PDSCH EVM recoded = lteDLSCH(enb, pdsch, pdschIndicesInfo.G, sib1); remod = ltePDSCH(enb, pdsch, recoded); [~,refSymbols] = ltePDSCHDecode(enb, pdsch, remod); [rmsevm,peakevm] = pdschEVM(refSymbols{1}, pdschSymbols{1}); fprintf('PDSCH RMS EVM: %0.3f%%\n',rmsevm); fprintf('PDSCH Peak EVM: %0.3f%%\n\n',peakevm); fprintf('SIB1 CRC: %d\n',crc); if crc == 0 fprintf('Successful SIB1 recovery.\n\n'); else fprintf('SIB1 decoding failed.\n\n'); end else % Indicate that creating a PDSCH configuration from the DCI % message failed fprintf('Creating PDSCH configuration from DCI message failed.\n\n'); end end if (numel(alldci)==0) % Indicate that DCI decoding failed fprintf('DCI decoding failed.\n\n'); end % Update channel estimate plot figure(channelFigure); surf(abs(hest(:,:,1,1))); hSIB1RecoveryExamplePlots(channelFigure); channelFigure.CurrentAxes.XLim = [0 size(hest,2)+1]; channelFigure.CurrentAxes.YLim = [0 size(hest,1)+1]; % Skip 2 frames and try SIB1 decoding again, or terminate if we % have less than 2 frames left. if (size(rxgrid,2)>=(L*20)) rxgrid(:,1:(L*20),:) = []; % Remove 2 more frames else rxgrid = []; % Less than 2 frames left end enb.NFrame = mod(enb.NFrame + 2,1024); end
--------------------------------------------------
SIB1 decoding for frame 406
--------------------------------------------------
Decoding CFI...
Decoded CFI value: 2
PDCCH search for SI-RNTI...
DCI message with SI-RNTI:
DCIFormat: 'Format1A'
CIF: 0
AllocationType: 0
Allocation: [1x1 struct]
ModCoding: 6
HARQNo: 0
NewData: 0
RV: 1
TPCPUCCH: 0
TDDIndex: 0
SRSRequest: 0
HARQACKResOffset: 0
PDSCH settings after DCI decoding:
RNTI: 65535
PRBSet: [8x1 uint64]
NLayers: 2
CSI: 'On'
Modulation: {'QPSK'}
RV: 1
TxScheme: 'TxDiversity'
NTurboDecIts: 5
Decoding SIB1...
PDSCH RMS EVM: 27.072%
PDSCH Peak EVM: 75.981%
SIB1 CRC: 0
Successful SIB1 recovery.


В этом примере используются эти вспомогательные функции.