lte dl-凯发k8网页登录
in lte the downlink shared channel (dl-sch) is a transport channel used for the transmission of user data, dedicated control and user-specific higher layer information and downlink system information. the physical downlink shared channel (pdsch) is the physical channel that carries the dl-sch coded data. this example shows the different stages involved in the downlink shared channel (dl-sch) and physical downlink shared channel (pdsch) processing and provides access to the data from these intermediate stages.
introduction
the lte toolbox™ provides functions for physical layer modeling with varying levels of granularity ranging from system level functions that can generate the full uplink and downlink waveforms to phy channel level functions that perform the transport/physical channel processing and individual channel processing stage functions performing crc coding, turbo coding, etc. these functions, with the simple interface and ease of parameterization, help in rapid prototyping of standard compliant models and therefore are useful in a wide variety of applications. the advantages of a test and verification workflow using individual channel processing stages illustrated in this example are:
use as golden reference for alternate implementations
ease of creating static or dynamic test vectors for receiver or hardware unit testing
understand the dl-sch/pdsch processing
the varying levels of granularity allows the users to create models with as much access to intermediate data as required and generate a large number of waveforms or test vectors for automated testing. for the dl-sch and pdsch processing and decoding, the toolbox provides , , and . these are channel level functions capable of processing all stages of the relevant transport or physical channel as described in ts 36.212 section 5.3.2 [ 1 ] and ts 36.211 section 6.4 [ 2 ]. this example shows how to use the functions performing individual channel processing steps for dl-sch and pdsch encoding and decoding for the use cases where access to the intermediate values/processing stages are required. the various stages of the processing chain and the functions the lte toolbox provides for the dl-sch and pdsch are shown by the diagrams below.
setup
the functions used in the example require a combination of cell-wide parameters and channel specific parameters. these are input to the functions as fields of structures or as individual parameters.
% cell-wide settings % the cell-wide parameters are grouped into a single structure enb. a % number of the functions used in this example require a subset of the % parameters specified below. in this example we use the configuration % according to the rmc r.14 fdd specified in ts 36.101 annex a.3.4 which % uses 50 rb, 4 port, 'spatialmux' transmission scheme, '16qam' symbol % modulation, 2 codewords and a code rate of 1/2. enb.ndlrb = 50; % number of resource blocks enb.cellrefp = 4; % cell-specific reference signal ports enb.ncellid = 0; % cell id enb.cyclicprefix = 'normal'; % normal cyclic prefix enb.cfi = 2; % length of control region enb.duplexmode = 'fdd'; % fdd duplex mode enb.tddconfig = 1; % uplink/downlink configuration (tdd only) enb.ssc = 4; % special subframe configuration (tdd only) enb.nsubframe = 0; % subframe number % transport/physical channel settings for ease of use the dl-sch and pdsch % channel specific settings are specified in a parameter structure pdsch. % for the r.14 fdd rmc, there are two codewords, so the modulation scheme % is specified as a cell array containing the modulation schemes of both % codewords. if configuring for one codeword, the modulation scheme can be % a character vector or a cell array with character vectors. % it is also important to configure the trblksizes parameter to have the % correct number of elements as the intended number of codewords. the % number of soft bits for the rate matching stage is decided by the ue % category as specified in ts 36.306 table 4.1-1. in this example, the % transport block size is looked up from tables in ts 36.101 annex a.3.4. % this can also be done by using the ltermcdl function for r.14 rmc. % dl-sch settings trblksizes = [11448; 11448]; % 2 elements for 2 codeword transmission pdsch.rv = [0 0]; % rv for the 2 codewords pdsch.nsoftbits = 1237248; % no of soft channel bits for ue category 2 % pdsch settings pdsch.txscheme = 'spatialmux'; % transmission scheme used pdsch.modulation = {'16qam','16qam'}; % symbol modulation for 2 codewords pdsch.nlayers = 2; % two spatial transmission layers pdsch.ntxants = 2; % number of transmit antennas pdsch.rnti = 1; % the rnti value pdsch.prbset = (0:enb.ndlrb-1)';% the prbs for full allocation pdsch.pmiset = 0; % precoding matrix index pdsch.w = 1; % no ue-specific beamforming % only required for 'port5', 'port7-8', 'port8' and 'port7-14' schemes if any(strcmpi(pdsch.txscheme,{'port5','port7-8','port8', 'port7-14'})) pdsch.w = transpose(ltecsicodebook(pdsch.nlayers,pdsch.ntxants,[0 0])); end
downlink shared channel (dl-sch) processing
this section explains the dl-sch transport channel coding. one transport block enters the processing chain every scheduled subframe (for spatial multiplexing schemes, there can be two transport blocks). the transport blocks get coded and rate matched to the pdsch channel bit capacity. the pdsch capacity depends on the prb allocations, modulation scheme, and transmission scheme and this value is provided as an output from the function. the transport channel encoding process includes the following stages as shown in figure 1 above.
transport block crc attachment: error detection for the transport blocks are provided by a 24-bit crc according to ts 36.212 section 5.3.2.1 [ 1 ].
code block segmentation and code block crc attachment: as shown in the figure 1 above, code block segmentation splits the input data bit vector into a cell array of code block segments (with filler bits and type-24b crc appended as appropriate) according to the rules of ts 36.212 section 5.3.2.2 [ 1 ]. the function provides code block segmentation information for the given block size.
channel coding: the code blocks are individually turbo coded according to ts 36.212 section 5.3.2.3 [ 1 ]. the turbo coder () can process a cell array containing all code block segments in parallel and returns a cell array containing the individual turbo coded block segments.
rate matching and code block concatenation: the turbo coded blocks are then individually rate matched according to ts 36.212 section 5.3.2.4 [ 1 ] and the resulting rate matched blocks are concatenated as per ts 36.212 section 5.3.2.5 [ 1 ] to create a single codeword for transmission on the pdsch.
% random number initialization for creating random transport block(s) rng('default'); % convert the modulation scheme char array or cell array to string array % for uniform processing pdsch.modulation = string(pdsch.modulation); % get the number of codewords from the number of transport blocks ncodewords = numel(trblksizes); % generate the transport block(s) trblk = cell(1,ncodewords); % initialize the codeword(s) for n=1:ncodewords trblk{n} = randi([0 1],trblksizes(n),1); end % get the physical channel bit capacity required for rate matching from % ltepdschindices info output [~,pdschinfo] = ltepdschindices(enb,pdsch,pdsch.prbset); % define a structure array with parameters for lteratematchturbo chs = pdsch; chs(ncodewords) = pdsch; % for 2 codewords, the array has two elements % initialize the codeword(s) cw = cell(1,ncodewords); for n=1:ncodewords % crc addition for the transport block crccoded = ltecrcencode(trblk{n},'24a'); % code block segmentation returns a cell array of code block segments % with filler bits and type-24b crc appended as required blksegmented = ltecodeblocksegment(crccoded); % channel coding returns the turbo coded segments in a cell array chencoded = lteturboencode(blksegmented); % bundle the parameters in structure chs for rate matching as the % function requires both cell-wide and channel specific parameters chs(n).modulation = pdsch.modulation{n}; chs(n).duplexmode = enb.duplexmode; chs(n).tddconfig = enb.tddconfig; % calculate number of layers for the codeword if n==1 chs(n).nlayers = floor(pdsch.nlayers/ncodewords); else chs(n).nlayers = ceil(pdsch.nlayers/ncodewords); end % rate matching returns a codeword after sub-block interleaving, bit % collection and bit selection and pruning defined for turbo encoded % data and merging the cell array of code block segments cw{n} = lteratematchturbo(chencoded,pdschinfo.g(n),pdsch.rv(n),chs(n)); end
physical downlink shared channel (pdsch) processing
one or two transport coded blocks (codewords) can be transmitted simultaneously on the pdsch depending on the transmission scheme used (see ts 36.211 section 6.4 [ 2 ]). as shown in figure 2 above, the codewords undergo scrambling, modulation, layer mapping, precoding, optional ue-specific beamforming and resource element mapping. the size of the matrix precoded
is n-by-p with n being the number of modulation symbols for one antenna port, and p being the number of transmission antennas.
scrambling: up to two codewords can be transmitted in a subframe and for each codeword, the bits are scrambled with a different scrambling sequence according to ts 36.211 section 6.3.1 [ 2 ]. the scrambling sequence is initialized at the start of each subframe and depends on
rnti
,ncellid
,nsubframe
and the codeword index.modulation: the scrambled codeword(s) is then symbol modulated using one of the modulation schemes ('qpsk', '16qam', '64qam' or '256qam')
layer mapping: the complex modulated symbols are then mapped on to one or several layers according to the transmission scheme used (ts 36.211 section 6.3.3 [ 1 ]). for single port (port 0, 5, 7 or 8), a single layer is used. for transmit diversity only one codeword is allowed and the number of layers (2 or 4) must be equal to the number of antenna ports used for the transmission of the physical channel. for spatial multiplexing 1 or 2 codewords can be transmitted on up to 8 layers. the number of layers is less than or equal to the number of antenna ports used for transmission of the physical channel.
precoding: the precoding stage takes in the m-by-layers matrix from the layer mapping stage and returns the matrix of size m-by-p for transmission on p antennas as defined in ts 36.211 section 6.3.4 [ 2 ]. for single port (port 0, 5, 7 or 8), this stage is transparent and for transmit diversity, precoding is applied for 2 or 4 antenna ports. precoding for spatial multiplexing depends on whether antenna ports with cell-specific reference signals ('spatialmux', 'cdd' and 'multiuser' transmission schemes) or antenna ports with ue-specific reference signals ('port5', 'port7-8', 'port8' and 'port7-14' transmission schemes) are used.
mapping to resource elements: the complex modulated symbols are then mapped on to the resource elements as defined in ts 36.211 section 6.3.5 [ 2 ] to create the grid for transmission. this stage is not shown in this example, but can be easily done by creating an empty resource grid using and mapping the symbols to resource elements returned by the
ltepdschindices
function.
% initialize the modulated symbols modulated = cell(1,ncodewords); for n=1:ncodewords % generate the scrambling sequence scramseq = ltepdschprbs(enb,pdsch.rnti,n-1,length(cw{n})); % scramble the codewords scrambled = xor(scramseq,cw{n}); % symbol modulate the scrambled codewords modulated{n} = ltesymbolmodulate(scrambled,pdsch.modulation{n}); end % layer mapping results in a (symbols per layer)-by-nlayers matrix layermapped = ltelayermap(pdsch,modulated); % precoding results in a (symbols per antenna)-by-ntxants matrix precoded = ltedlprecode(enb, pdsch, layermapped); % apply beamforming optionally (w should be 1 or identity if no beamforming) pdschsymbols = precoded*pdsch.w;
pdsch decoding
the decoding is the inverse of physical downlink shared channel (pdsch) processing on the matrix of complex modulated pdsch symbols, depending on cell-wide settings structure enb
and channel-specific configuration structure pdsch
. the channel inverse processing includes the deprecoding, layer demapping and codeword separation, soft demodulation and descrambling. the deprecoding is performed using matrix pseudo inversion of the precoding matrices. for applications involving propagation channels and/or noise, channel estimation and equalization is done on the received symbols before decoding. see for further information.
% deprecoding (pseudo-inverse based) returns (number of symbols)-by-nlayers matrix if (any(strcmpi(pdsch.txscheme,{'port5' 'port7-8' 'port8' 'port7-14'}))) rxdeprecoded=pdschsymbols*pinv(pdsch.w); else rxdeprecoded = ltedldeprecode(enb,pdsch,pdschsymbols); end % layer demapping returns a cell array containing one or two codewords. the % number of codewords is deduced from the number of modulation scheme % character vectors layerdemapped = ltelayerdemap(pdsch,rxdeprecoded); % initialize the recovered codewords cws = cell(1,ncodewords); for n=1:ncodewords % soft demodulation of received symbols demodulated = ltesymboldemodulate(layerdemapped{n},pdsch.modulation{n},'soft'); % scrambling sequence generation for descrambling scramseq = ltepdschprbs(enb,pdsch.rnti,n-1,length(demodulated),'signed'); % descrambling of received bits cws{n} = demodulated.*scramseq; end
dl-sch decoding
the downlink shared channel (dl-sch) decoding includes rate recovery, turbo decoding, block concatenation and crc calculations. alternatively the function ltedlschdecode
also provides the same functionality. this function also returns the type-24a transport block crc decoding result, type-24b code block set crc decoding result, the harq process decoding state and provides parameterization for specifying the initial harq process state.
% initialize the received transport block and crc rxtrblk = cell(1,ncodewords); crcerror = zeros(1,ncodewords); for n=1:ncodewords % rate recovery stage also allows combining with soft information for % the harq process, using the input cbsbuffers. for the first % transmission of the transport block, the soft buffers are initialized % as empty. for retransmissions, the parameter cbsbuffers should be the % soft information from the previous transmission cbsbuffers = []; % initial transmission of the harq process % rate recovery returns a cell array of turbo encoded code blocks raterecovered = lteraterecoverturbo(cws{n},trblksizes,pdsch.rv(n),chs(n),cbsbuffers); nturbodecits = 5; % number of turbo decoding iteration cycles % turbo decoding returns a cell array of decoded code blocks turbodecoded = lteturbodecode(raterecovered,nturbodecits); % code block desegmentation concatenates the input code block segments % into a single output data block, after removing any filler and % type-24b crc bits that may be present [blkdesegmented,segerr] = ltecodeblockdesegment(turbodecoded,(trblksizes 24)); % crc decoding returns the transport block after checking for crc error [rxtrblk{n},crcerror(n)] = ltecrcdecode(blkdesegmented,'24a'); end
conclusion
this example explained the downlink shared channel (dl-sch) and physical downlink shared channel (pdsch) processing and provided an insight into the different functions available within lte toolbox to support these channels. the example also illustrated how the low level functions can be used to model the channels and this approach can be used in applications including golden reference test vector generation from these intermediate processing stages to independently validate the different processing stages of alternate implementations. this example also shows how the lte toolbox and matlab platform enables the creation of a powerful environment for large scale verification and test.
further exploration
you can modify the parameters provided in this example to experiment with different configurations. for e.g. when simulating for different transmission modes, some of the parameters of interest are transmission scheme (txscheme
), modulation scheme (modulation
), number of codewords (number of elements of trblksizes
).
selected bibliography
3gpp ts 36.212 "multiplexing and channel coding"
3gpp ts 36.211 "physical channels and modulation"
3gpp ts 36.213 "physical layer procedures"
3gpp ts 36.101 "user equipment (ue) radio transmission and reception"
3gpp ts 36.306 "user equipment (ue) radio access capabilities"