ltePBCHPRBS

PBCH pseudorandom scrambling sequence

Syntax

[seq,cinit] = ltePBCHPRBS(enb,n)
[seq,cinit] = ltePBCHPRBS(enb,n,mapping)
[subseq,cinit] = ltePBCHPRBS(enb,pn)
[subseq,cinit] = ltePBCHPRBS(enb,pn,mapping)

Description

example

[seq,cinit] = ltePBCHPRBS(enb,n) returns a vector with the first n outputs of the Physical Broadcast Channel (PBCH) scrambling sequence when initialized with the structure enb. It also returns an initialization value cinit for the pseudorandom binary sequence (PRBS) generator.

[seq,cinit] = ltePBCHPRBS(enb,n,mapping) allows control over the format of the returned sequence, seq, with the input mapping.

[subseq,cinit] = ltePBCHPRBS(enb,pn) returns a subsequence of a full PRBS sequence, specified by pn.

[subseq,cinit] = ltePBCHPRBS(enb,pn,mapping) allows control over the format of the returned subsequence, subseq, with the input mapping.

Examples

collapse all

Scramble the MasterInformationBlock broadcast channel (BCCH) message.

Create a cell-wide configuration structure initialized to RMC R.0. Generate the MIB and coded BCH.

enb = lteRMCDL('R.0');
mib = lteMIB(enb);
bchCoded = lteBCH(enb,mib);

Generate the required length of the PBCH scrambling sequence. Scramble the coded BCH.

pbchPrbsSeq = ltePBCHPRBS(enb,length(bchCoded));
scrambled = xor(pbchPrbsSeq, bchCoded);

Compare the PBCH scrambling sequence generated using both generic and PBCH-specific pseudorandom binary sequence generators.

Create a cell-wide configuration structure initialized to RMC R.0. Generate the first 25 bits of the pseudorandom binary sequence for physical layer cell identity, NCellID using ltePRBS and ltePBCHPRBS.

enb = lteRMCDL('R.0');
prbsSeq = ltePRBS(enb.NCellID, 25);
pbchPrbsSeq = ltePBCHPRBS(enb,25);
isequal(prbsSeq,pbchPrbsSeq)
ans = logical
   1

The generic pseudorandom binary scrambling sequence equals the PBCH-specific pseudorandom binary scrambling sequence.

Input Arguments

collapse all

Cell-wide settings, specified as a structure. enb must contain the following field.

Physical layer cell identity, specified as a scalar integer.

Data Types: double

Data Types: struct

Number of outputs, specified as a numeric scalar.

Data Types: double

Range of elements in returned subsequence, subseq, specified as a row vector of [p n]. The subsequence returns n values of the PRBS generator, starting at position p (0-based).

Data Types: double

Output sequence formatting, specified as 'binary' or 'signed'. mapping controls the format of the returned sequence.

  • 'binary' maps true to 1 and false to 0.

  • 'signed' maps true to –1 and false to 1.

Data Types: char | string

Output Arguments

collapse all

PBCH pseudorandom scrambling sequence, specified as a logical column vector or a numeric column vector. seq contains the first n outputs of the physical broadcast channel (PBCH) scrambling sequence. If you set mapping to 'signed', the output data type is double. Otherwise, the output data type is logical.

Data Types: logical | double

PBCH pseudorandom scrambling subsequence, specified as a logical column vector or a numeric column vector. subseq contains the values of the PRBS generator specified by pn. If you set mapping to 'signed', the output data type is double. Otherwise, the output data type is logical.

Data Types: logical | double

Initialization value for PRBS generator, returned as a numeric scalar.

Data Types: uint32

Introduced in R2014a