Documentation

wlanSegmentDeparseBits

Segment-deparse data bits

Description

example

y = wlanSegmentDeparseBits(bits,cbw,numES,numCBPS,numBPSCS) performs the inverse operation of the segment parsing defined in IEEE® 802.11ac™-2013 Section 22.3.10.7 when cbw is 'CBW16' or 'CBW160'.

Note

Segment deparsing of the bits applies only when the channel bandwidth is either 16 MHz or 160 MHz, and is bypassed for the remaining channel bandwidths (as stated in the aforementioned section of IEEE802.11ac-2013). Therefore, when cbw is any accepted value other than 'CBW16' or 'CBW160', wlanSegmentParseBits returns the input unchanged.

Examples

collapse all

Segment-deparse the coded bits for a VHT configuration (with a channel bandwidth of 160 MHz and three spatial streams) into two OFDM symbols.

Define the input parameters. Set the channel bandwidth to 160 MHz, the number of coded bits per OFDM symbol to 2808, the number of spatial streams to 3, the number of encoded streams to 1, the number of coded bits per subcarrier per spatial stream to 2, and the number of OFDM symbols to 2. Calculate the number of coded bits per OFDM symbol per spatial stream by dividing the number of coded bits per OFDM symbol by the number of spatial streams.

chanBW = 'CBW160';
numCBPS = 2808;
numSS = 3;
numES = 1;
numBPSCS = 2;
numSym = 2;
numCBPSS = numCBPS/numSS;

Create the input sequence of bits.

bits = randi([0 1],numCBPSS*numSym,numSS);

Perform segment parsing on the bits.

parsedBits = wlanSegmentParseBits(bits,chanBW,numES,numCBPS,numBPSCS);
size(parsedBits)
ans = 1×3

936     3     2

Perform segment deparsing on the parsed bits.

deparsedBits = wlanSegmentDeparseBits(parsedBits,chanBW,numES,numCBPS,numBPSCS);
size(deparsedBits)
ans = 1×2

1872           3

Verify that the deparsed data matches the original data.

isequal(bits,deparsedBits)
ans = logical
1

Input Arguments

collapse all

Input sequence of deinterleaved bits, specified as an (NCBPSSI×NSYM)-by-NSS-by-NSEG array, where:

• NCBPSSI is the number of coded bits per OFDM symbol per spatial stream per interleaver block.

• NSYM is the number of OFDM symbols.

• NSS is the number of spatial streams.

• NSEG is the number of segments. When cbw is 'CBW16' or 'CBW160', NSEG must be 2. Otherwise it must be 1.

Data Types: double | int8

Channel bandwidth in MHz, specified as 'CBW1','CBW2', 'CBW4','CBW8', 'CBW16', 'CBW20', 'CBW40', 'CBW80', or 'CBW160'.

Example: 'CBW160'

Data Types: char | string

Number of encoded streams, specified as an integer from 1 to 9, or 12.

Data Types: double

Number of coded bits per OFDM symbol, specified as a positive integer. When cbw is 'CBW16' or 'CBW160', numCBPS must be an integer equal to 468×NBPSCS×NSS, where:

• NBPSCS is the number of coded bits per subcarrier per spatial stream.

• NSS is the number of spatial streams. It accounts for the number of columns (second dimension) of the input bits.

Data Types: double

Number of coded bits per subcarrier per spatial stream, specified as log2(M), where M is the modulation order. Therefore, numBPSCS must equal:

• 1 for a BPSK modulation

• 2 for a QPSK modulation

• 4 for a 16QAM modulation

• 6 for a 64QAM modulation

• 8 for a 256QAM modulation

Data Types: double

Output Arguments

collapse all

Merged segments of data, specified as an (NCBPSS×NSYM)-by-NSS matrix, where:

• NCBPSS is the number of coded bits per OFDM symbol per spatial stream.

• NSYM is the number of OFDM symbols.

• NSS is the number of spatial streams.

Extended Capabilities

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