Main Content

nrPBCHDecode

Decode PBCH modulation symbols

Description

cw = nrPBCHDecode(sym,ncellid,v) returns a vector of soft bits cw resulting from performing the inverse of the physical broadcast channel (PBCH) processing defined in TS 38.211 Section 7.3.3 [1]. sym specifies the received PBCH symbols, ncellid is the physical layer cell identity number, and v specifies the scrambling sequence phase.

example

cw = nrPBCHDecode(sym,ncellid,v,nVar) specifies the noise variance scaling factor of the soft bits in the PBCH demodulation.

Examples

collapse all

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

Input Arguments

collapse all

Received PBCH modulation symbols, specified as a complex column vector.

Data Types: single | double
Complex Number Support: Yes

Physical layer cell identity number, specified as an integer from 0 to 1007.

Data Types: double

Scrambling sequence phase, specified as an integer from 0 to 7. v is 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 3).

  • 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 to 7).

Data Types: double

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.

Note

The default value assumes the decoder and coder are connected back-to-back, where the noise variance is zero. To avoid -Inf or +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.

Data Types: double

Output Arguments

collapse all

Approximate log likelihood ratio (LLR) soft bits, returned as a column vector of binary values. The length of cw is twice the length of the input sym.

Data Types: double | single

References

[1] 3GPP TS 38.211. “NR; Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[2] 3GPP TS 38.212. “NR; Multiplexing and channel coding.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2018b