nb-凯发k8网页登录
this example shows how to generate lte-advanced pro release 13 narrowband iot (nb-iot) uplink waveforms consisting of the narrowband physical uplink shared channel (npusch) and the associated demodulation reference signals for test and measurement applications using the lte toolbox™.
introduction
3gpp introduced a new air interface, narrowband iot (nb-iot) optimized for low data rate machine type communications in lte-advanced pro release 13. nb-iot provides cost and power efficiency improvements as it avoids the need for complex signaling overhead required for lte based systems.
the lte toolbox can be used to generate standard compliant nb-iot uplink complex baseband waveforms representing the 180khz narrowband carrier suitable for test and measurement applications. the lte toolbox supports all the nb-iot modes of operation described below - standalone, guardband and in-band.
standalone: nb-iot carrier deployed outside the lte spectrum, e.g. the spectrum used for gsm or satellite communications
guardband: nb-iot carrier deployed in the guardband between two lte carriers
in-band: nb-iot carrier deployed in resource blocks of an lte carrier
the nb-iot uplink consists of the following physical layer channels and signals:
narrowband demodulation reference signal (dm-rs)
narrowband physical uplink shared channel (npusch)
narrowband physical random access channel (nprach)
this example demonstrates the nb-iot uplink resource element (re) grid and waveform generation consisting of the npusch and dm-rs signals. the sections below introduce these physical signals and channels that form the grid along with key concepts including subframe repetition, logical and transport channel mappings, and the corresponding grids for the different configurations.
the example outputs the complex baseband waveform along with the populated grid containing the npusch and dm-rs signals. the waveform can be used for a range of applications from rf testing to simulation of receiver implementations.
npusch allocation
this section provides an overall description of how the npusch gets mapped into the nb-iot uplink slots.
the npusch can carry the uplink shared channel (ul-sch) or the uplink control information according to the two formats:
npusch format 1, used to carry the uplink shared channel (ul-sch)
npusch format 2, used to carry uplink control information
the npusch is transmitted on one or more resource units and each of these resource units are repeated up to 128 times to improve transmission reliability and coverage without compromising on the low power and low complexity requirements to meet ultra low end iot use cases.
the smallest mapping unit for the npusch is a resource unit. it is defined as 7 * nslotsul
consecutive sc-fdma symbols in the time domain and nscru
consecutive subcarriers in the frequency domain, where nslotsul
and nscru
are defined in ts 36.211 table 10.1.2.3-1 [ 1 ]. the nb-iot ul-sch may carry common control channel (ccch), dedicated control channel (dcch) or dedicated traffic channel (dtch) and maps on to the npusch physical channel (ts 36.300 section 6.1.3.1 and section 5.3.1a [ 6 ]). the npusch can be mapped to one or more than one resource units, nru
as defined by ts 36.211 section 10.1.3.6 [ 1 ] and each resource unit can be transmitted nrep
times.
the examples in the figure shows the repetition pattern with nrep
= 4. the total duration for transmitting a block of data is given by nru
* nulslots
* midenticalnpusch
as specified in ts 36.211 section 10.1.3.6 [ 1 ]. for the first case shown below, each transport block is transmitted over nru
= 2 and each of these nru
contains two ul slots indicated by nulslots
. after mapping to nslots
, these slots will be repeated midenticalnpusch
= 2 (assuming nscru > 1) times. in the second case, we assume that nscru
is 1 and hence midenticalnpusch
= 1. this, combined with nslots
= 1 results in the transmission pattern where each block is transmitted without internal repetitions. in all cases, the scrambling sequence is reset at the start of the codeword transmission or retransmission (see ts 36.211 section 10.1.3.1 [ 1 ]). the detailed specification of the repetition scheme can be found in ts 36.211 10.1.3 [ 1 ].
nb-iot uplink slot grid
in addition to the slot allocation described above, this section further explains the re allocation in a slot. the grid consists of one or more frames containing npusch and corresponding dm-rs.
dm-rs: the dm-rs is transmitted in every npusch slot with the same bandwidth as the associated npusch. the reference signals depend on the number of subcarriers
nscru
, the narrowband cell idnncellid
and the npusch formatnpuschformat
. the re positions depend on the npusch format and subcarrier spacing. for npusch format 1 with subcarrier spacing of 3.75khz, the dm-rs is transmitted on symbol 4 and with subcarrier spacing of 15khz, the dm-rs is transmitted on symbol 3. for npusch format 2 with subcarrier spacing of 3.75khz, the dm-rs is transmitted on symbols 0,1,2 and with subcarrier spacing of 15khz, the dm-rs is transmitted on symbols 2,3 and 4 in the slot.npusch: the npusch supports single tone bandwidth in addition to the multitone (12 subcarriers) bandwidth. single tone transmissions can use either the 15khz or 3.75khz subcarrier spacing whereas the multitone transmissions use the 15khz subcarrier spacing. this means that the slot duration for 15khz mode is 0.5ms and for 3.75khz the slot duration is 2ms. the scrambling sequence is initialized in the first slot of the transmission of the codeword. if there are repetitions enabled, then the scrambling sequence is reinitialized after every
midenticalnpusch
transmission of the codeword as described in ts 36.211 section 10.1.3.1[ 1 ]. the codewords are bpsk/qpsk modulated on to a single layer and precoded before mapping to one or more resource units. all the resource elements other than those used for demodulation reference signals are used for npusch transmission. if higher layer signaling (npusch-allsymbols
as described in ts 36.211 section 10.1.3.6 [ 1 ]) indicates the presence of the srs symbol, these symbols are counted in the npusch mapping, but not used for the transmission of the npusch (i.e. these npusch positions are punctured by srs).
npusch configuration
in this section, you configure the parameters required for npusch generation. the ue uses the combination of mcs (modulation and coding scheme) and resource assignment signaled via the dci to determine the transport block size from the set defined in ts 36.213 table 16.5.1.2-2 [ 3 ] to use for npusch transmission. in this example, this is specified via the parameter tbs
and the duration of the generated waveform is controlled via the totnumblks
parameter.
tbs = 144; % the transport block size totnumblks = 1; % number of simulated transport blocks ue = struct(); % initialize the ue structure ue.nbulsubcarrierspacing = '15khz'; % 3.75khz, 15khz ue.nncellid = 0; % narrowband cell identity chs = struct(); % npusch carries data or control information chs.npuschformat = 'data'; % payload type (data or control) % the number of subcarriers used for npusch 'nscru' depends on the npusch % format and subcarrier spacing 'nbulsubcarrierspacing' as shown in ts % 36.211 table 10.1.2.3-1. there are 1,3,6 or 12 contiguous subcarriers for % npusch chs.nbulsubcarrierset = 0; % range is 0-11 (15khz); 0-47 (3.75khz) chs.nrusc = length(chs.nbulsubcarrierset); chs.cyclicshift = 0; % cyclic shift required when nrusc = 3 or 6 chs.rnti = 0; % rnti value chs.nlayers = 1; % number of layers chs.nru = 2; % number of resource units chs.nrep = 4; % number of repetitions of the npusch chs.slotidx = 0; % start slot index in a bundle % the symbol modulation depends on the npusch format and nscru as % given by ts 36.211 table 10.1.3.2-1 chs.modulation = 'qpsk'; rvdci = 0; % rv offset signaled via dci (see 36.213 16.5.1.2) % specify the npusch and dm-rs power scaling in db for plot visualization chs.npuschpower = 30; chs.npuschdrspower = 34;
for dm-rs signals in npusch format 1, sequence-group hopping can be enabled or disabled by the higher layer cell-specific parameter grouphoppingenabled
. sequence-group hopping for a particular ue can be disabled through the higher layer parameter grouphoppingdisabled
as described in ts 36.211 section 10.1.4.1.3 [ 1 ]. in this example, we use the seqgrouphopping
parameter to enable or disable sequence-group hopping.
chs.seqgrouphopping = 'on'; % enable/disable sequence-group hopping for ue chs.seqgroup = 0; % delta_ss. higher-layer parameter groupassignmentnpusch % get number of time slots in a resource unit nulslots according to % ts 36.211 table 10.1.2.3-1 if strcmpi(chs.npuschformat,'data') if chs.nrusc == 1 nulslots = 16; elseif any(chs.nrusc == [3 6 12]) nulslots = 24/chs.nrusc; else error('invalid number of subcarriers. nrusc must be one of 1,3,6,12'); end elseif strcmpi(chs.npuschformat,'control') nulslots = 4; else error('invalid npusch format (%s). npuschformat must be ''data'' or ''control''',chs.npuschformat); end chs.nulslots = nulslots; nslotsperbundle = chs.nru*chs.nulslots*chs.nrep; % number of slots in a codeword bundle totnslots = totnumblks*nslotsperbundle; % total number of simulated slots
nb-iot uplink waveform generation
in this section, you create the resource grid populated with the npusch and the corresponding demodulation reference signals. this grid is then sc-fdma modulated to generate the time domain waveform.
% initialize the random generator to default state rng('default'); % get the slot grid and number of slots per frame emptyslotgrid = ltenbresourcegrid(ue); slotgridsize = size(emptyslotgrid); nslotsperframe = 20/(slotgridsize(1)/12); state = []; % npusch encoder and dm-rs state, auto re-initialization in the function trblk = []; % initialize the transport block txgrid = []; % full grid initialization % display the number of slots being generated fprintf('\ngenerating %d slots corresponding to %d transport block(s)\n',totnslots,totnumblks); for slotidx = 0 (0:totnslots-1) % calculate the frame number and slot number within the frame ue.nframe = fix(slotidx/nslotsperframe); ue.nslot = mod(slotidx,nslotsperframe); if isempty(trblk) if strcmpi(chs.npuschformat,'data') % ul-sch encoding is done for the two rv values used for % transmitting the codewords. the rv sequence used is determined % from the rvdci value signaled in the dci and alternates % between 0 and 2 as given in ts 36.213 section 16.5.1.2 % define the transport block which will be encoded to create the % codewords for different rv trblk = randi([0 1],tbs,1); % determine the coded transport block size [~, info] = ltenpuschindices(ue,chs); outblklen = info.g; % create the codewords corresponding to the two rv values used % in the first and second block, this will be repeated till all % blocks are transmitted chs.rv = 2*mod(rvdci 0,2); % rv for the first block cw = ltenulsch(chs,outblklen,trblk); % crc and turbo coding chs.rv = 2*mod(rvdci 1,2); % rv for the second block cw = [cw ltenulsch(chs,outblklen,trblk)]; %#ok% crc and turbo coding is repeated else trblk = randi([0 1],1); % 1 bit ack % for ack, the same codeword is transmitted every block as % defined in ts 36.212 section 6.3.3 cw = ltenulsch(trblk); end blockidx = 0; % first block to be transmitted end % initialize grid slotgrid = emptyslotgrid; % npusch encoding and mapping onto the slot grid txsym = ltenpusch(ue,chs,cw(:,mod(blockidx,size(cw,2)) 1),state); % map npusch symbols in the grid of a slot indicesnpusch = ltenpuschindices(ue,chs); slotgrid(indicesnpusch) = txsym*db2mag(chs.npuschpower); % create dm-rs sequence and map to the slot grid [dmrs,state] = ltenpuschdrs(ue,chs,state); indicesdmrs = ltenpuschdrsindices(ue,chs); slotgrid(indicesdmrs) = dmrs*db2mag(chs.npuschdrspower); % concatenate this slot to the slot grid txgrid = [txgrid slotgrid]; %#ok% if a full block is transmitted, increment the clock counter so that % the correct codeword can be selected if state.endofblk blockidx = blockidx 1; end % trblk err count and re-initialization if state.endoftx % re-initialize to enable the transmission of a new transport block trblk = []; end end % perform sc-fdma modulation to create time domain waveform ue.cyclicprefixul = 'normal'; % normal cyclic prefix length for nb-iot [waveform,scfdmainfo] = ltescfdmamodulate(ue,chs,txgrid);
generating 128 slots corresponding to 1 transport block(s)
plot transmitted grid
plot the populated grid and observe the npusch and corresponding dm-rs. the positions of the npusch and dm-rs depends on the number of subcarriers chs.nrusc
and the subcarriers used as specified by chs.nbulsubcarrierset
. 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 figure im = image(abs(txgrid)); cmap = parula(64); colormap(im.parent,cmap); axis xy; title(sprintf('nb-iot uplink re grid (nrep = %d, nrusc = %d, nru = %d)',chs.nrep,chs.nrusc,chs.nru)) xlabel('ofdm symbols') ylabel('subcarriers') % create the legend box to indicate the channel/signal types associated with the res renames = {'npusch';'dm-rs'}; clevels = round(db2mag([chs.npuschpower chs.npuschdrspower])); 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)); legend(renames{:});
selected bibliography
3gpp ts 36.211 "physical channels and modulation"
3gpp ts 36.212 "multiplexing and channel coding"
3gpp ts 36.213 "physical layer procedures"
3gpp ts 36.321 "medium access control (mac); protocol specification"
3gpp ts 36.331 "radio resource control (rrc); protocol specification"
3gpp ts 36.300 "overall description; stage 2"
o. liberg, m. sundberg, y.-p. wang, j. bergman and j. sachs, cellular internet of things: technologies, standards and performance, elsevier, 2018.