main content

lte-凯发k8网页登录

this example shows how to create an uplink lte-m transmission consisting of the physical uplink shared channel (pusch) and associated demodulation reference signals (dm-rs) including repetitions and frequency hopping. when compared to pre-release 13 devices, cat-m devices offer lower cost and complexity, enhanced coverage by the introduction of repetitions and an extended drx for further power saving.

introduction

the cell-specific subframe bitmap broadcasted on the system information (si) indicates which subframes are capable of lte-m transmissions. lte-m devices can optionally enable repetitions for the pusch and pucch to enhance coverage. the network configures a set of possible repetitions containing 4 values for ce mode a (pusch-maxnumrepetitioncemodea as given in ts 36.213 table 8-2b [ 3 ]) and 8 values for ce mode b (pusch-maxnumrepetitioncemodeb as given in ts 36.213 table 8-2c [ 3 ]). from this set, the network dynamically selects the actual repetitions and signals this to the ue as part of the scheduling grant. uplink scheduling grants for lte-m devices are carried on the mpdcch using dci format 6-0a for devices operating in ce mode a and 6-0b for devices operating in ce mode b. a scheduling grant ending in downlink subframe n is valid for an uplink pusch transmission starting in uplink subframe n 4. in the case of transmissions with frequency hopping, the grant indicates the narrowband for the first transmission. subsequent allocations can hop between narrowbands as defined in ts 36.211 section 5.3.4 [ 1 ].

pusch

for cat-m1 (release 13) devices, pusch is always transmitted in a single narrowband. in cat-m2 (release 14), devices in ce mode a can optionally transmit over up to 24 prbs if the higher layer parameter ce-pusch-maxbandwidth-config is set to 5mhz as indicated in ts 36.211 section 5.3.4 [ 1 ]/ts 36.306 section 4.3.4.64 [ 4 ]. lte-m pusch can have up to 32 repetitions in ce mode a (see ts 36.213 table 8-2b [ 3 ])and up to 2048 repetitions in ce mode b (see ts 36.213 table 8-2c [ 3 ]). for bl/ce ue in ce mode a, pusch frequency hopping is enabled when the higher-layer parameter pusch-hoppingconfig is set and the frequency hopping flag in dci format 6-0a indicates frequency hopping. for bl/ce ue in ce mode b, pusch frequency hopping is enabled when the higher-layer parameter pusch-hoppingconfig is set. if frequency hopping is not enabled for pusch, all pusch repetitions are located at the same prb resources. if frequency hopping is enabled for pusch, pusch is transmitted in a subframe within the nabspusch consecutive uplink subframes using the same number of consecutive prbs as in the previous subframe starting from the same starting prb resource within narrowband. if a resource assignment or frequency hopping would result in a pusch resource allocation outside the allocatable prbs then the pusch transmission in that subframe is dropped.

ue = struct();                % initialize the structure
ue.nulrb = 50;                % bandwidth
ue.duplexmode = 'fdd';        % duplex mode
ue.tddconfig = 1;             % ul/dl configuration if tdd duplex mode
ue.cyclicprefixul = 'normal'; % the cyclic prefix length
ue.ncellid = 1;               % cell identity
ue.rnti = 1;                  % rnti value
ue.nframe = 0;                % frame number
ue.nsubframe = 0;             % subframe number
ue.ntxants = 1;               % number of transmit antennas
ue.shortened = 1;             % last symbol availability (allocation for srs)
% set up hopping specific parameters
ue.hoppingoffset = 1;% narrowband offset between one narrowband and the next narrowband
                     % a pusch hops to, expressed as a number of uplink narrowbands
ue.nchulnb = 2;      % number of consecutive absolute subframes over which
                     % pucch or pusch stays at the same
pusch  = struct();
pusch.cemode = 'a';         % ce mode a or ce mode b
pusch.hopping = true;       % enable/disable frequency hopping
pusch.nreppusch = 8;        % the total number of pusch repetitions
pusch.modulation = 'qpsk';  % symbol modulation
pusch.rv = 0;               % redundancy version for ul-sch processing
pusch.nlayers = 1;          % number of layers
pusch.trblksizes = 100;     % transport block size

pusch allocation - the pusch bandwidth is usually a single 1.4mhz narrowband. there are 6 rbs in each narrowband, all can be allocated in ce mode a and 1 or 2 rbs in ce mode b. an extended bw of 5mhz possible in cat-m2 ce mode a configuration (see ts 36.306 section 4.3.4.64 [ 4 ]). we use the initprbset and initnarrowbandindex to specify the prbs in a narrowband and the narrowband used in transmission. if frequency hopping is disabled, lte-m pdsch will be transmitted in the prbs specified by the initprbset and initnarrowbandindex parameters. if hopping is enabled, the hopping rules determine the narrowband used per subframe. the 5mhz bandwidth is inferred via the use of more than 6 prbs in the initprbset parameter. in this case the hopping will be disabled and the initnarrowbandindex ignored.

% specify 1-based relative indices of rbs within a narrowband for all cases
% except 5mhz cat-m2 ce mode a. if 5mhz cat-m2 ce mode a, these are the
% absolute prbs used for transmission
pusch.initprbset = (2:3)';
% narrowband used for transmission (non-hopping, non-5mhz)
pusch.initnarrowbandindex = 1;
% specify the power scaling in db for pusch, pusch dm-rs
pusch.puschpower = 30;
pusch.puschdmrspower = 100;
% turn off hopping if allocation spans multiple narrowbands
if numel(pusch.initprbset) > 6
    pusch.hopping = false;
end

ul-sch encoding

for bl/ce ues in ce mode b, resource elements in the last sc-fdma symbol in a subframe configured with cell specific srs shall be counted in the pusch mapping but not used for transmission of the pusch. hence if ce mode b, turn off shortening when creating the coded transport block.

% identify all uplink subframes in a frame
info = arrayfun(@(x)lteduplexinginfo(setfield(ue,'nsubframe',x)),0:9);
ulsfs = arrayfun(@(x)strcmpi(x.subframetype,'uplink'),info);
% in this example, we assume that the first absolute subframe in which
% pusch is transmitted is the first available uplink subframe
pusch.initnsubframe = find(ulsfs,1)-1;
% calculate the allocation
pusch.prbset = getpuschallocation(ue,pusch);
uetemp = ue;
% create coded transport block for all symbols
if strcmpi(pusch.cemode,'b') && ue.shortened
    uetemp.shortened = 0;
end
[~,info] = ltepuschindices(uetemp,pusch);
% define ul-sch message bits
trdata = ones(pusch.trblksizes(1),1);
% create the coded ul-sch bits
pusch.betacqi = 2.0;
pusch.betari = 2.0;
pusch.betaack = 2.0;
codedtrblock = lteulsch(uetemp,pusch,info.g,trdata);

lte-m pusch generation

in this example, we generate the lte-m pusch and the corresponding dm-rs signals with repetitions and optional frequency hopping. pusch.nreppusch controls the number of pusch repetitions. the ue-specific parameter pusch.hopping enables hopping and the cell-wide parameters ue.hoppingoffset and ue.nchulnb defines the hopping pattern. in this example, if the allocation spans more than one narrowband, frequency hopping will be disabled. for lte-m, the same scrambling sequence is applied per subframe to pusch for a block of nacc subframes, all other processing stages i.e. symbol modulation, layer mapping, precoding and mapping to resource elements are the same for the lte pusch.

% number of subframes in a scrambling block
nacc = 1;
if strcmpi(ue.duplexmode,'fdd') && strcmpi(pusch.cemode,'b')
    nacc = 4;
elseif strcmpi(ue.duplexmode,'tdd') && strcmpi(pusch.cemode,'b')
    nacc = 5;
end
% total bl/ce subframes to simulate (all uplink subframes are bl/ce
% subframes) and the pusch is transmitted without any subframe gaps
totmtcsubframes = pusch.nreppusch;
% total absolute subframes to simulate
startsubframe = ue.nframe*10 ue.nsubframe; % initial absolute subframe number
lastabssf = getlastabssf(ulsfs,pusch.initnsubframe,totmtcsubframes);
totsubframes = lastabssf-startsubframe 1;
% create a resource grid for the entire transmission. the pusch and
% dm-rs symbols will be mapped in this array
subframesize = lteulresourcegridsize(ue);
sfgrid = zeros([subframesize(1) subframesize(2)*totsubframes subframesize(3:end)]);
mpuschsym = []; % initialize pusch symbols
for sf = startsubframe   (0:totsubframes -1)
    % set current absolute subframe and frame numbers
    ue.nsubframe = mod(sf,10);
    ue.nframe = floor((sf)/10);
    % skip processing if this is not an uplink subframe
    duplexinfo = lteduplexinginfo(ue);
    if ~strcmpi(duplexinfo.subframetype,'uplink')
        continue
    end
   % calculate the prbset used in the current subframe
    prbset = getpuschallocation(ue,pusch);
    % calculate the pdsch indices for the current subframe. for bl/ce ues
    % in ce mode b, resource elements in the last sc-fdma symbol in a
    % subframe configured with cell specific srs shall be counted in the
    % pusch mapping but not used for transmission of the pusch
    pusch.prbset = prbset;
    mpuschindices = ltepuschindices(ue,pusch);
    % create an empty subframe grid
    subframe = lteulresourcegrid(ue);
    % encode pusch symbols from the codeword
    % in the case of repetition, the same symbols are repeated in each of
    % a block of nreppusch subframes. frequency hopping is applied as required
    if ~mod(sf,nacc) || isempty(mpuschsym)
        uetemp = ue;
        if strcmpi(pusch.cemode,'b') && ue.shortened
            uetemp.shortened = 0;  % create symbols for full subframe
        end
        mpuschsym = ltepusch(uetemp,pusch,codedtrblock)*db2mag(pusch.puschpower);
    end
    % map srs punctured pusch symbols to the subframe grid
    subframe(mpuschindices) = mpuschsym(1:numel(mpuschindices));
    % create and map the dmrs symbols.
    ue.hopping = 'off';    % drs hopping
    ue.seqgroup = 0;       % pusch sequence group
    ue.cyclicshift = 0;    % used for n1dmrs
    % for lte-m ues, a cyclic shift field of '000' shall be assumed when
    % determining n2dmrs from table 5.5.2.1.1-1 of ts 36.211
    pusch.dyncyclicshift = 0; % cyclic shift of '000' for n2dmrs
    pusch.orthcover = 'off';  % no orthogonal cover sequence
    mpuschdrs = ltepuschdrs(ue,pusch)*db2mag(pusch.puschdmrspower);
    mpuschdrsindices = ltepuschdrsindices(ue,pusch);
    subframe(mpuschdrsindices) = mpuschdrs;
    % now assign the current subframe into the overall grid
    sfgrid(:,(1:subframesize(2)) sf*subframesize(2),:) = subframe;
end

create time domain baseband waveform

create the time domain baseband waveform by ofdm modulating the resource grid. the resulting matrix has four columns; one of which will contain the complex baseband time-domain waveform samples for the mpdcch

waveform = ltescfdmamodulate(ue,sfgrid);

plot transmitted grid and baseband waveform

plot the grid and time domain baseband waveform. if the transmission uses more than one port, only the first port is shown. note that the resource grid plot uses the power levels of the pusch and the dm-rs to assign colors to the resource elements.

% create an image of overall resource grid. since the pusch undergo
% transform precoding, we need to assign a single power level to all
% symbols to visualize in the plot
plotgrid = abs(sfgrid(:,:,1));
% get the dm-rs positions
drspos = (plotgrid==db2mag(pusch.puschdmrspower));
plotgrid(drspos) = 0;
% now set all pusch symbols to one power level to plot
plotgrid(plotgrid~=0) = db2mag(pusch.puschpower);
% now write back the drs and plot
plotgrid(drspos) = db2mag(pusch.puschdmrspower);
figure
im = image(plotgrid);
cmap = parula(64);
colormap(im.parent,cmap);
axis xy;
title(sprintf('lte-m cemode%s uplink re grid (nreppusch = %d)',pusch.cemode,pusch.nreppusch))
xlabel('ofdm symbols')
ylabel('subcarriers')
% create the legend box to indicate the channel/signal types associated with the res
renames = {'pusch';'pusch drs'};
clevels = round(db2mag([pusch.puschpower pusch.puschdmrspower]));
n = numel(renames);
l = line(ones(n),ones(n), 'linewidth',8); % generate lines
% set the colors according to cmap
set(l,{'color'},mat2cell(cmap( min(1 clevels,length(cmap) ),:),ones(1,n),3));   % set the colors according to cmap
legend(renames{:});

local functions

the following local functions are used in this example:

  • calcnarrowbandprbsets - calculate narrowbands and associated prbs

  • getpdschallocation - calculate the pusch subframe allocation

  • getlastabssf - calculate the last subframe number for pusch

selected bibliography

  1. 3gpp ts 36.211 "physical channels and modulation"

  2. 3gpp ts 36.212 "multiplexing and channel coding"

  3. 3gpp ts 36.213 "physical layer procedures"

  4. 3gpp ts 36.306 "user equipment (ue) radio access capabilities"

  5. 3gpp ts 36.331 "radio resource control (rrc) protocol specification"

  6. o. liberg, m. sundberg, y.-p. wang, j. bergman and j. sachs, cellular internet of things: technologies, standards and performance, elsevier, 2018.

  7. e. dahlman, s. parkvall and j skold 4g lte-advanced pro and the road to 5g

local functions

% calculate the widebands, narrowbands and prbsets for the lte carrier bandwidth
function [prbsets,nnb,nwb] = calcnarrowbandprbsets(nulrb)
    % narrowbands & widebands (see 36.211 section 5.2.4)
    nulnb = floor(nulrb/6);
    nnb = 0:(nulnb-1); % narrowbands
    if nulnb >= 4
        nulwb = floor(nulnb/4);
    else
        nulwb = 1;
    end
    nwb = 0:(nulwb-1); % widebands
    % prbs in a narrowband
    ii = 0:5;
    ii0 = floor(nulrb/2) - 6*(nulnb/2);
    prbsets = zeros(6,numel(nnb));
    for nb = 1:numel(nnb)
        if mod(nulrb,2) && nnb(nb)>= (nulnb/2)
            prbsets(:,nb) = 6*(nnb(nb)) ii0 ii   1;
        else
            prbsets(:,nb) = 6*(nnb(nb)) ii0 ii;
        end
    end
end
% calculate the resource blocks allocated for pusch in the subframe
function prbset = getpuschallocation(ue,chs)
    % if 5mhz mode (up to 24 prbs can be used), the allocation is the same
    % as initprbset
    if numel(chs.initprbset) > 6
        prbset = chs.initprbset;
        return;
    end
    % get the narrowbands and corresponding resources
    [prbsets,nnb] = calcnarrowbandprbsets(ue.nulrb);
    if max(chs.initnarrowbandindex) > max(nnb)
        error('invalid narrowband(s) specified. there are only %d narrowbands in the bandwidth from 0...%d', nnb 1, nnb);
    end
    % if frequency hopping is disabled, the allocation is the same for
    % every subframe
    if ~chs.hopping
        prbset = prbsets(chs.initprbset,chs.initnarrowbandindex 1);
        return
    end
    % hopping narrowband calculation according to ts 36.211 section 5.3.4
    j0 = floor((chs.initnsubframe)/ue.nchulnb);
    % calculate the narrowband for this subframe
    ue.nsubframe = ue.nframe*10 ue.nsubframe; % get the absolute subframe number
    if mod(floor(ue.nsubframe/ue.nchulnb-j0),2) == 0
        nnbi = chs.initnarrowbandindex;
    else
        nnbi = mod(chs.initnarrowbandindex ue.hoppingoffset,numel(nnb));
    end
    % calculate the prbset for this subframe, they are on the same rbs
    % within the narrowband
    [rbstartindex,nbstartindex] = find(prbsets == chs.initprbset(1));
    [rbendindex,nbendindex] = find(prbsets == chs.initprbset(end));
    if (isempty(rbstartindex) || isempty(rbendindex)) || (nbstartindex ~= nbendindex)
       error('invalid prbset specified, must be resources within single narrowband');
    end
    prbset = prbsets(rbstartindex:rbstartindex numel(chs.initprbset)-1,nnbi 1);
end
% get the absolute subframe number which is used for the last transmission
% of a channel
function lastabssf = getlastabssf(ulsfs,initnsubframe,totmtcsubframes)
    numulsfsinframe = sum(ulsfs); % number of active sfs in a frame
    ulsfsinframe = find(ulsfs);   % ul subframes in the frame (1-based)
    % find the first absolute subframe and frame
    initabssf = mod(initnsubframe,10);
    initabsf = floor(initnsubframe/10);
    startidxwithinframe = initabssf 1; % 1-based index to the ul sf
    if ~ulsfs(startidxwithinframe)
        error(['invalid absolute subframe number of the first uplink subframe', ...
              ' intended for pusch (%d) specified. this is not an uplink subframe'],initnsubframe)
    end
    sfslastframe = mod((find(ulsfsinframe==startidxwithinframe)-1) totmtcsubframes,numulsfsinframe); % subframes to tx in the last frame
    if sfslastframe
        % find the subframe number corresponding to the last subframe to transmit
        sfsnumlastframe = find(ulsfs,sfslastframe)-1;
        sfsnumlastframe = sfsnumlastframe(end);
    else
        % no partial frames required
        sfsnumlastframe = 0;
    end
    lastabssf = (initabsf   floor(((find(ulsfsinframe==startidxwithinframe)-1) totmtcsubframes)/numulsfsinframe)) * 10   sfsnumlastframe;
end
网站地图