main content

cell search, mib and sib1 recovery -凯发k8网页登录

this example shows how to fully synchronize, demodulate and decode a live enodeb signal by using lte toolbox™ software. before the user equipment (ue) can communicate with the network, it must perform cell search and selection procedures, and then obtain initial system information. this process involves acquiring slot and frame synchronization, determining the cell identity and decoding the mib and system information blocks (sibs). this example demonstrates this process and decodes the mib and sib1, the first of the system information blocks. decoding the mib and sib1 requires a comprehensive that is capable of demodulating and decoding the majority of the downlink channels and signals.

introduction

in order to communicate with the network the ue must obtain some basic system information. this is carried by the mib and sibs. the mib carries the most essential system information:

  • system bandwidth

  • system frame number (sfn)

  • physical hybrid automatic repeat request (harq) indicator channel (phich) configuration

the mib is carried on the broadcast channel (bch) mapped into the physical broadcast channel (pbch). this is transmitted with a fixed coding and modulation scheme and can be decoded after the initial cell search procedure. with the information obtained from the mib the ue can now decode the control format indicator (cfi), which indicates the physical downlink control channel (pdcch) length. this allows the pdcch to be decoded, and searched for downlink control information (dci) messages. a dci message crc masked with system information radio network temporary identifier (si-rnti) indicates that a sib is carried in the same subframe. the sibs are transmitted in the broadcast control channel (bcch) logical channel. generally, bcch messages are carried on the downlink shared channel (dl-sch) and transmitted on the physical downlink shared channel (pdsch). the format and resource allocation of the pdsch transmission is indicated by a dci message on the pdcch.

this example decodes the mib and systeminformationblocktype1 (sib1). the latter is transmitted to specify the scheduling of other system information, along with aspects of the cell identity such as public land mobile network (plmn) identity. although sib1 is transmitted in a fixed time schedule, the resource allocation of the pdsch carrying sib1 is dynamic and is indicated in an associated dci message.

load and process i/q waveform

matlab® can be used to acquire i/q data from a wide range of instruments using the instrument control toolbox™. in this example a single antenna i/q capture of an enodeb with two transmit antennas is used. the capture is performed at 15.36 msamples/s which is sufficient to correctly sample all valid enodeb bandwidths up to 10 mhz: 1.4 mhz, 3 mhz, 5 mhz, 10 mhz. the captured data is stored in the file enodeboutput.mat.

alternatively, a suitable lte signal can be generated using the lte toolbox. this can be controlled by the variable loadfromfile.

loadfromfile = 1; % set to 0 to generate the enodeb output locally

the mib corresponds to one bch transport block. the bch transmission time interval (tti), or the time needed to transmit a single transport block, is 40msec or 4 frames. the bch is transmitted in 4 parts, each part mapped to the first subframe (subframe 0) of a frame and it is possible that each transmission is independently decodable, depending on signal conditions. to ensure that subframe 0 is received, the capture should be at least 11 subframes long, to account for the possibility that the capture is started during subframe 0. for poor signal conditions, all 4 parts of the tti may be required, in which case the capture should be at least 41 subframes long. a similar situation applies for sib1; it is transmitted in subframe 5 of every even frame, with four different redundancy versions (rvs) being transmitted consecutively giving an overall period of 80msec or 8 frames. therefore 21 subframes of capture are required to ensure reception of a single rv of sib1 (in subframe 5 of an even frame), but up to 81 subframes of capture are required if signal conditions are such that all rvs need to be combined.

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
    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

prior to decoding the mib, the ue does not know the full system bandwidth. the primary and secondary synchronization signals (pss and sss) and the pbch (containing the mib) all lie in the central 72 subcarriers (6 resource blocks) of the system bandwidth, allowing the ue to initially demodulate just this central region. therefore the bandwidth is initially set to 6 resource blocks. the i/q waveform needs to be resampled accordingly. at this stage we also display the spectrum of the input signal 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
[spectrumscope,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
if (isempty(enodeboutput))
    fprintf('\nreceived signal must not be empty.\n');
    return;
end
% display received signal spectrum
fprintf('\nplotting received signal spectrum...\n');
spectrumscope(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...

cell search, cyclic prefix length and duplex mode detection

call to obtain the cell identity and timing offset offset to the first frame head. the cell search is repeated for each combination of cyclic prefix length and duplex mode, and the combination with the strongest correlation allows these parameters to be identified. a plot of the correlation between the received signal and the pss/sss for the detected cell identity is produced. the pss is detected using time-domain correlation and the sss is detected using frequency-domain correlation. prior to sss detection, frequency offset estimation/correction using cyclic prefix correlation is performed. the time-domain pss detection is robust to small frequency offsets but larger offsets may degrade the pss correlation.

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})'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

frequency offset estimation and correction

prior to ofdm demodulation, any significant frequency offset must be removed. the frequency offset in the i/q waveform is estimated and corrected using and . the frequency offset is estimated by means of correlation of the cyclic prefix and therefore can estimate offsets up to /- half the subcarrier spacing i.e. /- 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

ofdm demodulation and channel estimation

the ofdm downsampled i/q waveform is demodulated to produce a resource grid rxgrid. this is used to perform channel estimation. hest is the channel estimate, nest is an estimate of the noise (for mmse equalization) and cec is the channel estimator configuration.

for channel estimation the example assumes 4 cell specific reference signals. this means that channel estimates to each receiver antenna from all possible cell-specific reference signal ports are available. the true number of cell-specific reference signal ports is not yet known. the channel estimation is only performed on the first subframe, i.e. using the first l ofdm symbols in rxgrid.

a conservative 13-by-9 pilot averaging window is used, in frequency and time, to reduce the impact of noise on pilot estimates during channel estimation.

% 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...

pbch demodulation, bch decoding, mib parsing

the mib is now decoded along with the number of cell-specific reference signal ports transmitted as a mask on the bch crc. the function establishes frame timing modulo 4 and returns this in the nfmod4 parameter. it also returns the mib bits in vector mib and the true number of cell-specific reference signal ports which is assigned into enb.cellrefp at the output of this function call. if the number of cell-specific reference signal ports is decoded as enb.cellrefp=0, this indicates a failure to decode the bch. the function is used to parse the bit vector mib and add the relevant fields to the configuration structure enb. after mib decoding, the detected bandwidth is present in 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

ofdm demodulation on full bandwidth

now that the signal bandwidth is known, the signal is resampled to the nominal sampling rate used by lte toolbox for that bandwidth (see for details). frequency offset estimation and correction is performed on the resampled signal. timing synchronization and ofdm demodulation are then performed.

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...

sib1 decoding

the following steps are performed in this section:

  • physical control format indicator channel (pcfich) demodulation, cfi decoding

  • pdcch decoding

  • blind pdcch search

  • sib bits recovery: pdsch demodulation and dl-sch decoding

  • buffering and resetting of the dl-sch harq state

after recovery the sib crc should be 0.

these decoding steps are performed in a loop for each occurrence of a subframe carrying sib1 in the received signal. as mentioned above, the sib1 is transmitted in subframe 5 of every even frame, so the input signal is first checked to establish that at least one occurrence of sib1 is present. for each sib1 subframe, the channel estimate magnitude response is plotted, as is the constellation of the received 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.

网站地图