ldpc processing for dl-凯发k8网页登录
this example highlights the low-density parity-check (ldpc) coding chain for the 5g nr downlink and uplink shared transport channels (dl-sch and ul-sch).
shared channel parameters
the example uses the dl-sch to describe the processing, which also applies to the ul-sch.
select parameters for a transport block transmitted on the downlink shared (dl-sch) channel.
rng(210); % set rng state for repeatability a = 10000; % transport block length, positive integer rate = 449/1024; % target code rate, 0rv = 0; % redundancy version, 0-3 modulation = 'qpsk'; % modulation scheme, qpsk, 16qam, 64qam, 256qam nlayers = 1; % number of layers, 1-4 for a transport block
based on the selected transport block length and target coding rate, dl-sch coding parameters are determined using the function.
% dl-sch coding parameters cbsinfo = nrdlschinfo(a,rate); disp('dl-sch coding parameters') disp(cbsinfo)
dl-sch coding parameters crc: '24a' l: 24 bgn: 1 c: 2 lcb: 24 f: 244 zc: 240 k: 5280 n: 15840
dl-sch supports multi-codeword transmission (i.e. two transport blocks) while ul-sch supports only a single codeword. ul-sch also supports pi/2-bpsk modulation in addition to those listed above for dl-sch.
transport block processing using ldpc coding
data delivered from the mac layer to the physical layer is termed as a transport block. for the downlink shared channel (dl-sch), a transport block goes through the processing stages of:
crc attachment,
code block segmentation and code block crc attachment,
channel coding using ldpc,
rate matching and code block concatenation
before being passed on to the physical downlink shared channel (pdsch) for scrambling, modulation, layer mapping and resource/antenna mapping. each of these stages is performed by a function as shown next.
% random transport block data generation in = randi([0 1],a,1,'int8'); % transport block crc attachment tbin = nrcrcencode(in,cbsinfo.crc); % code block segmentation and crc attachment cbsin = nrcodeblocksegmentldpc(tbin,cbsinfo.bgn); % ldpc encoding enc = nrldpcencode(cbsin,cbsinfo.bgn); % rate matching and code block concatenation outlen = ceil(a/rate); chin = nrratematchldpc(enc,outlen,rv,modulation,nlayers);
the output number of bits from the rate matching and code block concatenation process must match the bit capacity of the pdsch, based on the available resources. in this example, as the pdsch is not modeled, this is set to achieve the target code rate based on the transport block size previously selected.
similar processing applies for the ul-sch, where the physical uplink shared channel (pusch) is the recipient of the ul-sch codeword. the following schematics depict the processing for the two channels.
refer to and system objects that encapsulate the processing per transport block, with additional support for retransmissions.
channel
a simple bipolar channel with no noise is used for this example. with the full pdsch or pusch processing, one can consider fading channels, awgn and other rf impairments as well.
chout = double(1-2*(chin));
receive processing using ldpc decoding
the receive end processing for the dl-sch channel comprises of the corresponding dual operations to the transmit end that include
rate recovery
ldpc decoding
code block desegmentation and crc decoding
transport block crc decoding
each of these stages is performed by a function as shown next.
% rate recovery raterec = nrraterecoverldpc(chout,a,rate,rv,modulation,nlayers); % ldpc decoding decbits = nrldpcdecode(raterec,cbsinfo.bgn,25); % code block desegmentation and crc decoding [blk,blkerr] = nrcodeblockdesegmentldpc(decbits,cbsinfo.bgn,a cbsinfo.l); disp(['crc error per code-block: [' num2str(blkerr) ']']) % transport block crc decoding [out,tberr] = nrcrcdecode(blk,cbsinfo.crc); disp(['transport block crc error: ' num2str(tberr)]) disp(['recovered transport block with no error: ' num2str(isequal(out,in))])
crc error per code-block: [0 0] transport block crc error: 0 recovered transport block with no error: 1
as the displays indicate, there are no crc errors at both the code-block and transport block levels. this leads to the transport block being recovered and decoded with no errors, as expected, for a noiseless channel.
refer to and system objects that encapsulate the receive processing per codeword, with additional soft-combining of retransmissions for improved performance.
see also
functions
- | | | | | | | | | | | | |