nr pusch throughput -凯发k8网页登录
this reference simulation shows how to measure the physical uplink shared channel (pusch) throughput of a 5g new radio (nr) link, as defined by the 3gpp nr standard. the example implements pusch and uplink transport channel (ul-sch). the transmitter model includes pusch demodulation reference signals (dm-rs). the example supports both clustered delay line (cdl) and tapped delay line (tdl) propagation channels. you can perform perfect or practical synchronization and channel estimation. to reduce the total simulation time, you can execute the snr points in the snr loop in parallel by using the parallel computing toolbox™.
introduction
this example measures the pusch throughput of a 5g link, as defined by the 3gpp nr standard [ 1 ], [ 2 ], [ 3 ], [ 4 ].
the example models these 5g nr features:
ul-sch transport channel coding
pusch and pusch dm-rs generation
variable subcarrier spacing and frame numerologies (2^n * 15 khz)
normal and extended cyclic prefix
tdl and cdl propagation channel models
other features of the simulation are:
codebook and non-codebook based pusch transmission schemes
optional pusch transform precoding
slot wise and non slot wise pusch and dm-rs mapping
perfect or practical synchronization and channel estimation
harq operation with 16 processes
the figure shows the implemented processing chain. for clarity, the dm-rs generation is omitted.
note that this example does not include closed-loop adaptation of the mimo precoding according to channel conditions. the pusch mimo precoding used in the example is as follows:
for codebook based transmission, the mimo precoding matrix used inside the pusch modulation can be selected using the tpmi parameter.
the implementation-specific mimo precoding matrix (for non-codebook based transmission, or mimo precoding between transmission antenna ports and antennas for codebook based transmission) is an identity matrix.
to reduce the total simulation time, you can use the parallel computing toolbox to execute the snr points of the snr loop in parallel.
simulation length and snr points
set the length of the simulation in terms of the number of 10ms frames. a large number of nframes should be used to produce meaningful throughput results. set the snr points to simulate. the snr is defined per re and applies to each receive antenna. for an explanation of the snr definition that this example uses, see .
simparameters = struct(); % clear simparameters variable to contain all key simulation parameters simparameters.nframes = 2; % number of 10 ms frames simparameters.snrin = [-5 0 5]; % snr range (db)
channel estimator configuration
the logical variable perfectchannelestimator
controls channel estimation and synchronization behavior. when set to true
, perfect channel estimation and synchronization is used. otherwise, practical channel estimation and synchronization is used, based on the values of the received pusch dm-rs.
simparameters.perfectchannelestimator = true;
simulation diagnostics
the variable displaysimulationinformation
controls the display of simulation information such as the harq process id used for each subframe. in case of crc error, the value of the index to the rv sequence is also displayed.
simparameters.displaysimulationinformation = true;
the displaydiagnostics
flag enables the plotting of the evm per layer. this plot monitors the quality of the received signal after equalization. the evm per layer figure shows:
the evm per layer per slot, which shows the evm evolving with time.
the evm per layer per resource block, which shows the evm in frequency.
this figure evolves with the simulation and is updated with each slot. typically, low snr or channel fades can result in decreased signal quality (high evm). the channel affects each layer differently, therefore, the evm values may differ across layers.
in some cases, some layers can have a much higher evm than others. these low-quality layers can result in crc errors. this behavior may be caused by low snr or by using too many layers for the channel conditions. you can avoid this situation by a combination of higher snr, lower number of layers, higher number of antennas, and more robust transmission (lower modulation scheme and target code rate).
simparameters.displaydiagnostics = false;
carrier and pusch configuration
set the key parameters of the simulation. these include:
the bandwidth in resource blocks (12 subcarriers per resource block)
subcarrier spacing: 15, 30, 60, 120 (khz)
cyclic prefix length: normal or extended
cell id
number of transmit and receive antennas
a substructure containing the ul-sch and pusch parameters is also specified. this includes:
target code rate
allocated resource blocks (prbset)
modulation scheme: 'pi/2-bpsk', 'qpsk', '16qam', '64qam', '256qam'
number of layers
transform precoding (enable/disable)
pusch transmission scheme and mimo precoding matrix indication (tpmi)
number of antenna ports
pusch mapping type
dm-rs configuration parameters
other simulation wide parameters are:
propagation channel model delay profile (tdl or cdl)
note that if transform precoding is enabled, the number of layers should be set to 1.
% set waveform type and pusch numerology (scs and cp type) simparameters.carrier = nrcarrierconfig; % carrier resource grid configuration simparameters.carrier.nsizegrid = 52; % bandwidth in number of resource blocks (52 rbs at 15 khz scs for 10 mhz bw) simparameters.carrier.subcarrierspacing = 15; % 15, 30, 60, 120 (khz) simparameters.carrier.cyclicprefix = 'normal'; % 'normal' or 'extended' (extended cp is relevant for 60 khz scs only) simparameters.carrier.ncellid = 0; % cell identity % pusch/ul-sch parameters simparameters.pusch = nrpuschconfig; % this pusch definition is the basis for all pusch transmissions in the bler simulation simparameters.puschextension = struct(); % this structure is to hold additional simulation parameters for the ul-sch and pusch % define pusch time-frequency resource allocation per slot to be full grid (single full grid bwp) simparameters.pusch.prbset = 0:simparameters.carrier.nsizegrid-1; % pusch prb allocation simparameters.pusch.symbolallocation = [0,simparameters.carrier.symbolsperslot]; % pusch symbol allocation in each slot simparameters.pusch.mappingtype = 'a'; % pusch mapping type ('a'(slot-wise),'b'(non slot-wise)) % scrambling identifiers simparameters.pusch.nid = simparameters.carrier.ncellid; simparameters.pusch.rnti = 1; % define the transform precoding enabling, layering and transmission scheme simparameters.pusch.transformprecoding = false; % enable/disable transform precoding simparameters.pusch.numlayers = 1; % number of pusch transmission layers simparameters.pusch.transmissionscheme = 'noncodebook'; % transmission scheme ('noncodebook','codebook') simparameters.pusch.numantennaports = 1; % number of antenna ports for codebook based precoding simparameters.pusch.tpmi = 0; % precoding matrix indicator for codebook based precoding % define codeword modulation simparameters.pusch.modulation = 'qpsk'; % 'pi/2-bpsk', 'qpsk', '16qam', '64qam', '256qam' % pusch dm-rs configuration simparameters.pusch.dmrs.dmrstypeaposition = 2; % mapping type a only. first dm-rs symbol position (2,3) simparameters.pusch.dmrs.dmrslength = 1; % number of front-loaded dm-rs symbols (1(single symbol),2(double symbol)) simparameters.pusch.dmrs.dmrsadditionalposition = 1; % additional dm-rs symbol positions (max range 0...3) simparameters.pusch.dmrs.dmrsconfigurationtype = 1; % dm-rs configuration type (1,2) simparameters.pusch.dmrs.numcdmgroupswithoutdata = 2; % number of cdm groups without data simparameters.pusch.dmrs.nidnscid = 0; % scrambling identity (0...65535) simparameters.pusch.dmrs.nscid = 0; % scrambling initialization (0,1) simparameters.pusch.dmrs.nrsid = 0; % scrambling id for low-papr sequences (0...1007) simparameters.pusch.dmrs.grouphopping = 0; % group hopping (0,1) simparameters.pusch.dmrs.sequencehopping = 0; % sequence hopping (0,1) % additional simulation and ul-sch related parameters % % target code rate simparameters.puschextension.targetcoderate = 193 / 1024; % code rate used to calculate transport block size % % harq process and rate matching/tbs parameters simparameters.puschextension.xoverhead = 0; % set pusch rate matching overhead for tbs (xoh) simparameters.puschextension.nharqprocesses = 16; % number of parallel harq processes to use simparameters.puschextension.enableharq = true; % enable retransmissions for each process, using rv sequence [0,2,3,1] % ldpc decoder parameters % available algorithms: 'belief propagation', 'layered belief propagation', 'normalized min-sum', 'offset min-sum' simparameters.puschextension.ldpcdecodingalgorithm = 'normalized min-sum'; simparameters.puschextension.maximumldpciterationcount = 6; % define the overall transmission antenna geometry at end-points % if using a cdl propagation channel then the integer number of antenna elements is % turned into an antenna panel configured when the channel model object is created simparameters.ntxants = 1; % number of transmit antennas simparameters.nrxants = 2; % number of receive antennas % define the general cdl/tdl propagation channel parameters simparameters.delayprofile = 'tdl-a'; % use tdl-a model (indoor hotspot model) simparameters.delayspread = 30e-9; simparameters.maximumdopplershift = 10; % cross-check the pusch layering against the channel geometry validatenumlayers(simparameters);
the simulation relies on various pieces of information about the baseband waveform, such as sample rate.
waveforminfo = nrofdminfo(simparameters.carrier); % get information about the baseband waveform after ofdm modulation step
propagation channel model construction
create the channel model object for the simulation. both cdl and tdl channel models are supported [ 5 ].
% constructed the cdl or tdl channel model object if contains(simparameters.delayprofile,'cdl','ignorecase',true) channel = nrcdlchannel; % cdl channel object % turn the number of antennas into antenna panel array layouts. if % nrxants is not one of (1,2,4,8,16,32,64,128,256,512,1024), its value % is rounded up to the nearest value in the set. if ntxants is not 1 or % even, its value is rounded up to the nearest even number. channel = harraygeometry(channel,simparameters.ntxants,simparameters.nrxants,'uplink'); simparameters.ntxants = prod(channel.transmitantennaarray.size); simparameters.nrxants = prod(channel.receiveantennaarray.size); % configure antenna elements channel.transmitantennaarray.element = 'isotropic'; channel.receiveantennaarray.element = '38.901'; else channel = nrtdlchannel; % tdl channel object % set the channel geometry channel.numtransmitantennas = simparameters.ntxants; channel.numreceiveantennas = simparameters.nrxants; end % assign simulation channel parameters and waveform sample rate to the object channel.delayprofile = simparameters.delayprofile; channel.delayspread = simparameters.delayspread; channel.maximumdopplershift = simparameters.maximumdopplershift; channel.samplerate = waveforminfo.samplerate;
get the maximum number of delayed samples by a channel multipath component. this is calculated from the channel path with the largest delay and the implementation delay of the channel filter. this is required later to flush the channel filter to obtain the received signal.
chinfo = info(channel); maxchdelay = ceil(max(chinfo.pathdelays*channel.samplerate)) chinfo.channelfilterdelay;
processing loop
to determine the throughput at each snr point, the pusch data is analyzed per transmission instance using the following steps:
update current harq process. check the transmission status for the given harq process to determine whether a retransmission is required. if that is not the case then generate new data.
generate resource grid. channel coding is performed by . it operates on the input transport block provided. internally, it keeps a copy of the transport block in case a retransmission is required. the coded bits are modulated by . implementation-specific mimo precoding is applied to the resulting signal. note that if
txscheme='codebook'
, codebook based mimo precoding will already have been applied insidenrpusch
and the implementation-specific mimo precoding is an additional stage of mimo precoding.generate waveform. the generated grid is then ofdm modulated.
model noisy channel. the waveform is passed through a cdl or tdl fading channel. awgn is added. the snr for each layer is defined per re and per receive antenna.
perform synchronization and ofdm demodulation. for perfect synchronization, the channel impulse response is reconstructed and used to synchronize the received waveform. for practical synchronization, the received waveform is correlated with the pusch dm-rs. the synchronized signal is then ofdm demodulated.
perform channel estimation. if perfect channel estimation is used, the channel impulse response is reconstructed and ofdm demodulated to provide a channel estimate. for practical channel estimation, the pusch dm-rs is used.
extract pusch and perform equalization. the resource elements corresponding to the pusch allocation are extracted from the received ofdm resource grid and the channel estimate using . the received pusch resource elements are then mmse equalized using .
decode the pusch. the equalized pusch symbols, along with a noise estimate, are demodulated and descrambled by to obtain an estimate of the received codewords.
decode the uplink shared channel (ul-sch) and update harq process with the block crc error. the vector of decoded soft bits is passed to which decodes the codeword and returns the block crc error used to determine the throughput of the system.
% array to store the maximum throughput for all snr points maxthroughput = zeros(length(simparameters.snrin),1); % array to store the simulation throughput for all snr points simthroughput = zeros(length(simparameters.snrin),1); % set up redundancy version (rv) sequence for all harq processes if simparameters.puschextension.enableharq % from pusch demodulation requirements in ran wg4 meeting #88bis (r4-1814062) rvseq = [0 2 3 1]; else % harq disabled - single transmission with rv=0, no retransmissions rvseq = 0; end % create ul-sch encoder system object to perform transport channel encoding encodeulsch = nrulsch; encodeulsch.multipleharqprocesses = true; encodeulsch.targetcoderate = simparameters.puschextension.targetcoderate; % create ul-sch decoder system object to perform transport channel decoding % use layered belief propagation for ldpc decoding, with half the number of % iterations as compared to the default for belief propagation decoding decodeulsch = nrulschdecoder; decodeulsch.multipleharqprocesses = true; decodeulsch.targetcoderate = simparameters.puschextension.targetcoderate; decodeulsch.ldpcdecodingalgorithm = simparameters.puschextension.ldpcdecodingalgorithm; decodeulsch.maximumldpciterationcount = simparameters.puschextension.maximumldpciterationcount; for snridx = 1:numel(simparameters.snrin) % comment out for parallel computing % parfor snridx = 1:numel(simparameters.snrin) % uncomment for parallel computing % to reduce the total simulation time, you can execute this loop in % parallel by using the parallel computing toolbox. comment out the 'for' % statement and uncomment the 'parfor' statement. if the parallel computing % toolbox is not installed, 'parfor' defaults to normal 'for' statement. % because parfor-loop iterations are executed in parallel in a % nondeterministic order, the simulation information displayed for each snr % point can be intertwined. to switch off simulation information display, % set the 'displaysimulationinformation' variable above to false % reset the random number generator so that each snr point will % experience the same noise realization rng('default'); % take full copies of the simulation-level parameter structures so that they are not % pct broadcast variables when using parfor simlocal = simparameters; waveinfolocal = waveforminfo; % take copies of channel-level parameters to simplify subsequent parameter referencing carrier = simlocal.carrier; pusch = simlocal.pusch; puschextra = simlocal.puschextension; decodeulschlocal = decodeulsch; % copy of the decoder handle to help pct classification of variable decodeulschlocal.reset(); % reset decoder at the start of each snr point pathfilters = []; % create pusch object configured for the non-codebook transmission % scheme, used for receiver operations that are performed with respect % to the pusch layers puschnoncodebook = pusch; puschnoncodebook.transmissionscheme = 'noncodebook'; % prepare simulation for new snr point snrdb = simlocal.snrin(snridx); fprintf('\nsimulating transmission scheme 1 (%dx%d) and scs=%dkhz with %s channel at %gdb snr for %d 10ms frame(s)\n', ... simlocal.ntxants,simlocal.nrxants,carrier.subcarrierspacing, ... simlocal.delayprofile,snrdb,simlocal.nframes); % specify the fixed order in which we cycle through the harq process ids harqsequence = 0:puschextra.nharqprocesses-1; % initialize the state of all harq processes harqentity = harqentity(harqsequence,rvseq); % reset the channel so that each snr point will experience the same % channel realization reset(channel); % total number of slots in the simulation period nslots = simlocal.nframes * carrier.slotsperframe; % timing offset, updated in every slot for perfect synchronization and % when the correlation is strong for practical synchronization offset = 0; % loop over the entire waveform length for nslot = 0:nslots-1 % update the carrier slot numbers for new slot carrier.nslot = nslot; % calculate the transport block size for the transmission in the slot [puschindices,puschindicesinfo] = nrpuschindices(carrier,pusch); mrb = numel(pusch.prbset); trblksize = nrtbs(pusch.modulation,pusch.numlayers,mrb,puschindicesinfo.nreperprb,puschextra.targetcoderate,puschextra.xoverhead); % harq processing % if new data for current process then create a new ul-sch transport block if harqentity.newdata trblk = randi([0 1],trblksize,1); settransportblock(encodeulsch,trblk,harqentity.harqprocessid); % if new data because of previous rv sequence time out then flush decoder soft buffer explicitly if harqentity.sequencetimeout resetsoftbuffer(decodeulschlocal,harqentity.harqprocessid); end end % encode the ul-sch transport block codedtrblock = encodeulsch(pusch.modulation,pusch.numlayers, ... puschindicesinfo.g,harqentity.redundancyversion,harqentity.harqprocessid); % create resource grid for a slot puschgrid = nrresourcegrid(carrier,simlocal.ntxants); % pusch modulation, including codebook based mimo precoding if txscheme = 'codebook' puschsymbols = nrpusch(carrier,pusch,codedtrblock); % implementation-specific pusch mimo precoding and mapping. this % mimo precoding step is in addition to any codebook based % mimo precoding done during pusch modulation above if (strcmpi(pusch.transmissionscheme,'codebook')) % codebook based mimo precoding, f precodes between pusch % transmit antenna ports and transmit antennas f = eye(pusch.numantennaports,simlocal.ntxants); else % non-codebook based mimo precoding, f precodes between pusch % layers and transmit antennas f = eye(pusch.numlayers,simlocal.ntxants); end [~,puschantindices] = nrextractresources(puschindices,puschgrid); puschgrid(puschantindices) = puschsymbols * f; % implementation-specific pusch dm-rs mimo precoding and mapping. % the first dm-rs creation includes codebook based mimo precoding if applicable dmrssymbols = nrpuschdmrs(carrier,pusch); dmrsindices = nrpuschdmrsindices(carrier,pusch); for p = 1:size(dmrssymbols,2) [~,dmrsantindices] = nrextractresources(dmrsindices(:,p),puschgrid); puschgrid(dmrsantindices) = puschgrid(dmrsantindices) dmrssymbols(:,p) * f(p,:); end % ofdm modulation txwaveform = nrofdmmodulate(carrier,puschgrid); % pass data through 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. this is a mix % of multipath delay and implementation delay. this value may % change depending on the sampling rate, delay profile and delay % spread txwaveform = [txwaveform; zeros(maxchdelay,size(txwaveform,2))]; %#ok[rxwaveform,pathgains,sampletimes] = channel(txwaveform); % add awgn to the received time domain waveform % normalize noise power by the ifft size used in ofdm modulation, % as the ofdm modulator applies this normalization to the % transmitted waveform. also normalize by the number of receive % antennas, as the channel model applies this normalization to the % received waveform, by default snr = 10^(snrdb/10); n0 = 1/sqrt(2.0*simlocal.nrxants*double(waveinfolocal.nfft)*snr); noise = n0*complex(randn(size(rxwaveform)),randn(size(rxwaveform))); rxwaveform = rxwaveform noise; if (simlocal.perfectchannelestimator) % perfect synchronization. use information provided by the % channel to find the strongest multipath component pathfilters = getpathfilters(channel); [offset,mag] = nrperfecttimingestimate(pathgains,pathfilters); else % practical synchronization. correlate the received waveform % with the pusch dm-rs to give timing offset estimate 't' and % correlation magnitude 'mag'. the function % hskipweaktimingoffset is used to update the receiver timing % offset. if the correlation peak in 'mag' is weak, the current % timing estimate 't' is ignored and the previous estimate % 'offset' is used [t,mag] = nrtimingestimate(carrier,rxwaveform,dmrsindices,dmrssymbols); offset = hskipweaktimingoffset(offset,t,mag); % display a warning if the estimated timing offset exceeds the % maximum channel delay if offset > maxchdelay warning(['estimated timing offset (%d) is greater than the maximum channel delay (%d).' ... ' this will result in a decoding failure. this may be caused by low snr,' ... ' or not enough dm-rs symbols to synchronize successfully.'],offset,maxchdelay); end end rxwaveform = rxwaveform(1 offset:end,:); % perform ofdm demodulation on the received data to recreate the % resource grid, including padding in the event that 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 if (simlocal.perfectchannelestimator) % perfect channel estimation, use the value of the path gains % provided by the channel estchannelgrid = nrperfectchannelestimate(carrier,pathgains,pathfilters,offset,sampletimes); % get perfect noise estimate (from the noise realization) noisegrid = nrofdmdemodulate(carrier,noise(1 offset:end,:)); noiseest = var(noisegrid(:)); % apply mimo deprecoding to estchannelgrid to give an estimate % per transmission layer k = size(estchannelgrid,1); estchannelgrid = reshape(estchannelgrid,k*carrier.symbolsperslot*simlocal.nrxants,simlocal.ntxants); estchannelgrid = estchannelgrid * f.'; if (strcmpi(pusch.transmissionscheme,'codebook')) w = nrpuschcodebook(pusch.numlayers,pusch.numantennaports,pusch.tpmi,pusch.transformprecoding); estchannelgrid = estchannelgrid * w.'; end estchannelgrid = reshape(estchannelgrid,k,carrier.symbolsperslot,simlocal.nrxants,[]); else % practical channel estimation between the received grid and % each transmission layer, using the pusch dm-rs for each layer % which are created by specifying the non-codebook transmission % scheme dmrslayersymbols = nrpuschdmrs(carrier,puschnoncodebook); dmrslayerindices = nrpuschdmrsindices(carrier,puschnoncodebook); [estchannelgrid,noiseest] = nrchannelestimate(carrier,rxgrid,dmrslayerindices,dmrslayersymbols,'cdmlengths',pusch.dmrs.cdmlengths); end % get pusch resource elements from the received grid [puschrx,puschhest] = nrextractresources(puschindices,rxgrid,estchannelgrid); % equalization [puscheq,csi] = nrequalizemmse(puschrx,puschhest,noiseest); % decode pusch physical channel [ulschllrs,rxsymbols] = nrpuschdecode(carrier,puschnoncodebook,puscheq,noiseest); % display evm per layer, per slot and per rb. reference symbols for % each layer are created by specifying the non-codebook % transmission scheme if (simlocal.displaydiagnostics) refsymbols = nrpusch(carrier,puschnoncodebook,codedtrblock); plotlayerevm(nslots,nslot,puschnoncodebook,size(puschgrid),puschindices,refsymbols,puscheq); end % apply channel state information (csi) produced by the equalizer, % including the effect of transform precoding if enabled if (pusch.transformprecoding) msc = mrb * 12; csi = nrtransformdeprecode(csi,mrb) / sqrt(msc); csi = repmat(csi((1:msc:end).'),1,msc).'; csi = reshape(csi,size(rxsymbols)); end csi = nrlayerdemap(csi); qm = length(ulschllrs) / length(rxsymbols); csi = reshape(repmat(csi{1}.',qm,1),[],1); ulschllrs = ulschllrs .* csi; % decode the ul-sch transport channel decodeulschlocal.transportblocklength = trblksize; [decbits,blkerr] = decodeulschlocal(ulschllrs,pusch.modulation,pusch.numlayers,harqentity.redundancyversion,harqentity.harqprocessid); % store values to calculate throughput simthroughput(snridx) = simthroughput(snridx) (~blkerr * trblksize); maxthroughput(snridx) = maxthroughput(snridx) trblksize; % update current process with crc error and advance to next process procstatus = updateandadvance(harqentity,blkerr,trblksize,puschindicesinfo.g); if (simlocal.displaysimulationinformation) fprintf('\n(%3.2f%%) nslot=%d, %s',100*(nslot 1)/nslots,nslot,procstatus); end end % display the results dynamically in the command window if (simlocal.displaysimulationinformation) fprintf('\n'); end fprintf('\nthroughput(mbps) for %d frame(s) = %.4f\n',simlocal.nframes,1e-6*simthroughput(snridx)/(simlocal.nframes*10e-3)); fprintf('throughput(%%) for %d frame(s) = %.4f\n',simlocal.nframes,simthroughput(snridx)*100/maxthroughput(snridx)); end
simulating transmission scheme 1 (1x2) and scs=15khz with tdl-a channel at -5db snr for 2 10ms frame(s) (5.00%) nslot=0, harq proc 0: cw0: initial transmission failed (rv=0,cr=0.190705). (10.00%) nslot=1, harq proc 1: cw0: initial transmission failed (rv=0,cr=0.190705). (15.00%) nslot=2, harq proc 2: cw0: initial transmission failed (rv=0,cr=0.190705). (20.00%) nslot=3, harq proc 3: cw0: initial transmission failed (rv=0,cr=0.190705). (25.00%) nslot=4, harq proc 4: cw0: initial transmission failed (rv=0,cr=0.190705). (30.00%) nslot=5, harq proc 5: cw0: initial transmission failed (rv=0,cr=0.190705). (35.00%) nslot=6, harq proc 6: cw0: initial transmission failed (rv=0,cr=0.190705). (40.00%) nslot=7, harq proc 7: cw0: initial transmission failed (rv=0,cr=0.190705). (45.00%) nslot=8, harq proc 8: cw0: initial transmission failed (rv=0,cr=0.190705). (50.00%) nslot=9, harq proc 9: cw0: initial transmission failed (rv=0,cr=0.190705). (55.00%) nslot=10, harq proc 10: cw0: initial transmission failed (rv=0,cr=0.190705). (60.00%) nslot=11, harq proc 11: cw0: initial transmission failed (rv=0,cr=0.190705). (65.00%) nslot=12, harq proc 12: cw0: initial transmission failed (rv=0,cr=0.190705). (70.00%) nslot=13, harq proc 13: cw0: initial transmission failed (rv=0,cr=0.190705). (75.00%) nslot=14, harq proc 14: cw0: initial transmission failed (rv=0,cr=0.190705). (80.00%) nslot=15, harq proc 15: cw0: initial transmission failed (rv=0,cr=0.190705). (85.00%) nslot=16, harq proc 0: cw0: retransmission #1 passed (rv=2,cr=0.190705). (90.00%) nslot=17, harq proc 1: cw0: retransmission #1 passed (rv=2,cr=0.190705). (95.00%) nslot=18, harq proc 2: cw0: retransmission #1 passed (rv=2,cr=0.190705). (100.00%) nslot=19, harq proc 3: cw0: retransmission #1 passed (rv=2,cr=0.190705). throughput(mbps) for 2 frame(s) = 0.5712 throughput(%) for 2 frame(s) = 20.0000 simulating transmission scheme 1 (1x2) and scs=15khz with tdl-a channel at 0db snr for 2 10ms frame(s) (5.00%) nslot=0, harq proc 0: cw0: initial transmission passed (rv=0,cr=0.190705). (10.00%) nslot=1, harq proc 1: cw0: initial transmission passed (rv=0,cr=0.190705). (15.00%) nslot=2, harq proc 2: cw0: initial transmission passed (rv=0,cr=0.190705). (20.00%) nslot=3, harq proc 3: cw0: initial transmission passed (rv=0,cr=0.190705). (25.00%) nslot=4, harq proc 4: cw0: initial transmission passed (rv=0,cr=0.190705). (30.00%) nslot=5, harq proc 5: cw0: initial transmission passed (rv=0,cr=0.190705). (35.00%) nslot=6, harq proc 6: cw0: initial transmission passed (rv=0,cr=0.190705). (40.00%) nslot=7, harq proc 7: cw0: initial transmission passed (rv=0,cr=0.190705). (45.00%) nslot=8, harq proc 8: cw0: initial transmission passed (rv=0,cr=0.190705). (50.00%) nslot=9, harq proc 9: cw0: initial transmission passed (rv=0,cr=0.190705). (55.00%) nslot=10, harq proc 10: cw0: initial transmission passed (rv=0,cr=0.190705). (60.00%) nslot=11, harq proc 11: cw0: initial transmission passed (rv=0,cr=0.190705). (65.00%) nslot=12, harq proc 12: cw0: initial transmission passed (rv=0,cr=0.190705). (70.00%) nslot=13, harq proc 13: cw0: initial transmission passed (rv=0,cr=0.190705). (75.00%) nslot=14, harq proc 14: cw0: initial transmission passed (rv=0,cr=0.190705). (80.00%) nslot=15, harq proc 15: cw0: initial transmission passed (rv=0,cr=0.190705). (85.00%) nslot=16, harq proc 0: cw0: initial transmission passed (rv=0,cr=0.190705). (90.00%) nslot=17, harq proc 1: cw0: initial transmission passed (rv=0,cr=0.190705). (95.00%) nslot=18, harq proc 2: cw0: initial transmission passed (rv=0,cr=0.190705). (100.00%) nslot=19, harq proc 3: cw0: initial transmission passed (rv=0,cr=0.190705). throughput(mbps) for 2 frame(s) = 2.8560 throughput(%) for 2 frame(s) = 100.0000 simulating transmission scheme 1 (1x2) and scs=15khz with tdl-a channel at 5db snr for 2 10ms frame(s) (5.00%) nslot=0, harq proc 0: cw0: initial transmission passed (rv=0,cr=0.190705). (10.00%) nslot=1, harq proc 1: cw0: initial transmission passed (rv=0,cr=0.190705). (15.00%) nslot=2, harq proc 2: cw0: initial transmission passed (rv=0,cr=0.190705). (20.00%) nslot=3, harq proc 3: cw0: initial transmission passed (rv=0,cr=0.190705). (25.00%) nslot=4, harq proc 4: cw0: initial transmission passed (rv=0,cr=0.190705). (30.00%) nslot=5, harq proc 5: cw0: initial transmission passed (rv=0,cr=0.190705). (35.00%) nslot=6, harq proc 6: cw0: initial transmission passed (rv=0,cr=0.190705). (40.00%) nslot=7, harq proc 7: cw0: initial transmission passed (rv=0,cr=0.190705). (45.00%) nslot=8, harq proc 8: cw0: initial transmission passed (rv=0,cr=0.190705). (50.00%) nslot=9, harq proc 9: cw0: initial transmission passed (rv=0,cr=0.190705). (55.00%) nslot=10, harq proc 10: cw0: initial transmission passed (rv=0,cr=0.190705). (60.00%) nslot=11, harq proc 11: cw0: initial transmission passed (rv=0,cr=0.190705). (65.00%) nslot=12, harq proc 12: cw0: initial transmission passed (rv=0,cr=0.190705). (70.00%) nslot=13, harq proc 13: cw0: initial transmission passed (rv=0,cr=0.190705). (75.00%) nslot=14, harq proc 14: cw0: initial transmission passed (rv=0,cr=0.190705). (80.00%) nslot=15, harq proc 15: cw0: initial transmission passed (rv=0,cr=0.190705). (85.00%) nslot=16, harq proc 0: cw0: initial transmission passed (rv=0,cr=0.190705). (90.00%) nslot=17, harq proc 1: cw0: initial transmission passed (rv=0,cr=0.190705). (95.00%) nslot=18, harq proc 2: cw0: initial transmission passed (rv=0,cr=0.190705). (100.00%) nslot=19, harq proc 3: cw0: initial transmission passed (rv=0,cr=0.190705). throughput(mbps) for 2 frame(s) = 2.8560 throughput(%) for 2 frame(s) = 100.0000
results
display the measured throughput. this is calculated as the percentage of the maximum possible throughput of the link given the available resources for data transmission.
figure; plot(simparameters.snrin,simthroughput*100./maxthroughput,'o-.') xlabel('snr (db)'); ylabel('throughput (%)'); grid on; if (simparameters.pusch.transformprecoding) ofdmtype = 'dft-s-ofdm'; else ofdmtype = 'cp-ofdm'; end title(sprintf('%s / nrb=%d / scs=%dkhz / %s %d/1024 / %dx%d', ... ofdmtype,simparameters.carrier.nsizegrid,simparameters.carrier.subcarrierspacing, ... simparameters.pusch.modulation, ... round(simparameters.puschextension.targetcoderate*1024),simparameters.ntxants,simparameters.nrxants)); % bundle key parameters and results into a combined structure for recording simresults.simparameters = simparameters; simresults.simthroughput = simthroughput; simresults.maxthroughput = maxthroughput;
the figure below shows throughput results obtained simulating 10000 subframes (nframes = 1000
, snrin = -16:2:6
).
selected bibliography
3gpp ts 38.211. "nr; physical channels and modulation." 3rd generation partnership project; technical specification group radio access network.
3gpp ts 38.212. "nr; multiplexing and channel coding." 3rd generation partnership project; technical specification group radio access network.
3gpp ts 38.213. "nr; physical layer procedures for control." 3rd generation partnership project; technical specification group radio access network.
3gpp ts 38.214. "nr; physical layer procedures for data." 3rd generation partnership project; technical specification group radio access network.
3gpp tr 38.901. "study on channel model for frequencies from 0.5 to 100 ghz." 3rd generation partnership project; technical specification group radio access network.
local functions
function validatenumlayers(simparameters) % validate the number of layers, relative to the antenna geometry numlayers = simparameters.pusch.numlayers; ntxants = simparameters.ntxants; nrxants = simparameters.nrxants; antennadescription = sprintf('min(ntxants,nrxants) = min(%d,%d) = %d',ntxants,nrxants,min(ntxants,nrxants)); if numlayers > min(ntxants,nrxants) error('the number of layers (%d) must satisfy numlayers <= %s', ... numlayers,antennadescription); end % display a warning if the maximum possible rank of the channel equals % the number of layers if (numlayers > 2) && (numlayers == min(ntxants,nrxants)) warning(['the maximum possible rank of the channel, given by %s, is equal to numlayers (%d).' ... ' this may result in a decoding failure under some channel conditions.' ... ' try decreasing the number of layers or increasing the channel rank' ... ' (use more transmit or receive antennas).'],antennadescription,numlayers); %#okend end function plotlayerevm(nslots,nslot,pusch,siz,puschindices,puschsymbols,puscheq) % plot evm information persistent slotevm; persistent rbevm persistent evmperslot; if (nslot==0) slotevm = comm.evm; rbevm = comm.evm; evmperslot = nan(nslots,pusch.numlayers); figure; end evmperslot(nslot 1,:) = slotevm(puschsymbols,puscheq); subplot(2,1,1); plot(0:(nslots-1),evmperslot,'o-'); xlabel('slot number'); ylabel('evm (%)'); legend("layer " (1:pusch.numlayers),'location','eastoutside'); title('evm per layer per slot'); subplot(2,1,2); [k,~,p] = ind2sub(siz,puschindices); rbsubs = floor((k-1) / 12); nrb = siz(1) / 12; evmperrb = nan(nrb,pusch.numlayers); for nu = 1:pusch.numlayers for rb = unique(rbsubs).' this = (rbsubs==rb & p==nu); evmperrb(rb 1,nu) = rbevm(puschsymbols(this),puscheq(this)); end end plot(0:(nrb-1),evmperrb,'x-'); xlabel('resource block'); ylabel('evm (%)'); legend("layer " (1:pusch.numlayers),'location','eastoutside'); title(['evm per layer per resource block, slot #' num2str(nslot)]); drawnow; end
see also
objects
- | | |
functions
- | | |