Low-density parity-check (LDPC) rate recovery
returns the rate-recovered output representing the LDPC-encoded code blocks for input data
out = nrRateRecoverLDPC(
in. The input
trblklen is the transport
R is the target code rate,
rv is the
mod is the modulation type, and
nLayers is the number of transmission layers. The internal buffer
used for the soft input has no size limits, and the output contains the total number of code
nrRateRecoverLDPC is the inverse of
nrRateMatchLDPC and performs
the inverse of the code block concatenation, bit interleaving, and bit selection stages at
the receiver end.
Perform LDPC Rate Recovery
Create input data of length 4500 corresponding to soft bits. The length of the original transport block is 4000. Perform LDPC rate recovery of the input to one code block. Use single transmission layer with QPSK modulation and zero redundancy version.
sbits = ones(4500,1); trblklen = 4000; R = 0.5; rv = 0; mod = 'QPSK'; nlayers = 1; numCB = 1; raterec = nrRateRecoverLDPC(sbits,trblklen,R,rv,mod,nlayers,numCB); size(raterec)
ans = 1×2 12672 1
in — Received soft bits before code block desegmentation
Received soft bits before code block desegmentation, specified as a vector.
trblklen — Original transport block length
Original transport block length, specified as a nonnegative integer.
R — Target code rate
real scalar in the range (0,1)
Target code rate, specified as a real scalar in the range (0,1).
rv — Redundancy version
integer from 0 to 3
Redundancy version, specified as an integer from 0 to 3.
mod — Modulation scheme
Modulation scheme, specified as
'256QAM'. This modulation scheme determines the modulation type
of the codeword and the number of bits used per modulation symbol.
|Modulation Scheme||Number of Bits Per Symbol|
nLayers — Number of transmission layers
integer from 1 to 4
Number of transmission layers associated with the transport block, specified as an integer from 1 to 4.
numCB — Number of scheduled code block segments
Number of scheduled code block segments, specified as a positive integer.
numCB is less than or equal to the number of code block segments
for a transport block.
Nref — Limited buffer rate matching
Limited buffer rate matching, specified as a positive integer.
Nref is defined in TS 38.212 Section 220.127.116.11.
out — Rate-recovered scheduled code block segments
Rate-recovered scheduled code segments, returned as a matrix. The number of rows in
out is calculated from
R. The number of columns in
out is equal to
numCB, or the total number of code blocks for a transport block.
Filler bits are set to
Inf to correspond to zeros used during their
 3GPP TS 38.212. “NR; Multiplexing and channel coding.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Introduced in R2018b