Decode PBCH modulation symbols
returns a vector of soft bits
cw = nrPBCHDecode(
cw resulting from performing the inverse
of the physical broadcast channel (PBCH) processing defined in TS 38.211 Section 7.3.3 .
specifies the received PBCH symbols,
ncellid is the physical layer cell
identity number, and
v specifies the scrambling sequence phase.
Consider the first Synchronization Signal / Physical Broadcast Channel (SS/PBCH) block in a burst and assume that the number of SS/PBCH blocks per half-frame is 4.
ssbindex = 0; v = mod(ssbindex,4);
Generate a random sequence of binary values that represent encoded BCH bits. The length of the random sequence corresponds to the PBCH bit capacity as specified in TS 38.212 Section 7.1.5.
E = 864; cw = randi([0 1],E,1);
Generate the sequence of 432 PBCH quadrature phase shift keying (QPSK) modulation symbols.
ncellid = 17; sym = nrPBCH(cw,ncellid,v);
Create bit estimates by demodulating the PBCH symbols. Compare the result with the original input by casting the bit estimates to logical values.
rxcw = nrPBCHDecode(sym,ncellid,v); isequal(cw,rxcw<0)
ans = logical 1
sym— Received PBCH modulation symbols
Received PBCH modulation symbols, specified as a complex column vector.
Complex Number Support: Yes
ncellid— Physical layer cell identity number
Physical layer cell identity number, specified as an integer from 0 to 1007.
v— Scrambling sequence phase
Scrambling sequence phase, specified as an integer from 0 to 7.
derived in a synchronization signal (SS) burst configuration, from the least significant
bits (LSBs) of the SS/PBCH block index.
If the number of SS/PBCH blocks per half-frame is 4, then
v is the two LSBs of the SS/PBCH block index (0 to
If the number of SS/PBCH blocks per half-frame is 8 or 64, then
v is the three LSBs of the SS/PBCH block index (0
nVar— Noise variance
1e-10(default) | nonnegative numeric scalar
Noise variance, specified as a nonnegative numeric scalar. The soft bits are scaled with the variance of additive white Gaussian noise (AWGN). The default value corresponds to an SNR of 100 dB, assuming unit signal power.
The default value assumes the decoder and coder are connected back-to-back,
where the noise variance is zero. To avoid
+Inf values in the output, the function uses
1e-10 as the default value for noise variance. To get
appropriate results when the signal is transmitted through a noisy channel,
adjust the noise variance accordingly.
 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.