wlanSegmentParseBits
Segment-parse data bits
Description
performs
segment parsing on the input y
= wlanSegmentParseBits(bits
,cbw
,numES
,numCBPS
,numBPSCS
) bits
as per IEEE®
802.11™-2020, Section 21.3.10.7, when cbw
is
'CBW16'
or 'CBW160'
.
Note
Segment parsing 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 IEEE
802.11-2020). Therefore, when cbw
is any
accepted value other than 'CBW16'
or
'CBW160'
, wlanSegmentParseBits
returns the input unchanged.
Examples
Segment-Parse Bits in Two OFDM Symbols
Segment-parse 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,'int8');
Perform segment parsing on the bits.
parsedBits = wlanSegmentParseBits(bits,chanBW,numES,numCBPS,numBPSCS);
The parsed sequence is a three-dimensional array of bits.
size(parsedBits)
ans = 1×3
936 3 2
parsedBits(1:5,:,:)
ans = 5x3x2 int8 array
ans(:,:,1) =
1 0 1
0 1 1
1 0 1
0 0 0
1 0 1
ans(:,:,2) =
1 1 1
1 1 1
0 0 1
1 1 0
1 0 0
Get Bit Order of OFDM Symbol
Get the bit order after the segment parsing of an OFDM symbol of an S1G configuration with a channel bandwidth of 16 MHz, and two spatial streams.
Define the input parameters. Set the channel bandwidth to 16 MHz, the number of coded bits per OFDM symbol to 1872, the number of spatial streams to 2, 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 = 'CBW16';
numCBPS = 1872;
numSS = 2;
numES = 1;
numBPSCS = 2;
numSym = 1;
numCBPSS = numCBPS/numSS;
Create the input sequence.
sequence = (1:numCBPS*numSym).'; inp = reshape(sequence,numCBPSS*numSym,numSS);
Perform segment parsing on the sequence.
parsedSequence = wlanSegmentParseBits(inp,chanBW,numES,numCBPS,numBPSCS);
The parsed sequence is a three-dimensional array containing the corresponding bit order.
size(parsedSequence)
ans = 1×3
468 2 2
Input Arguments
bits
— Input sequence
matrix
Input sequence of stream-parsed bits, 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.
Data Types: double
| int8
cbw
— Channel bandwidth
'CBW1'
| 'CBW2'
| 'CBW4'
| 'CBW8'
| 'CBW16
| 'CBW20'
| 'CBW40'
| 'CBW80'
| 'CBW160'
Channel bandwidth in MHz, specified as
'CBW1'
,'CBW2'
,
'CBW4'
,'CBW8'
,
'CBW16'
, 'CBW20'
,
'CBW40'
, 'CBW80'
, or
'CBW160'
.
Example: 'CBW160'
Data Types: char
| string
numES
— Number of encoded streams
1 to 9 | 12
Number of encoded streams, specified as an integer from 1 to 9, or 12.
Data Types: double
numCBPS
— Number of coded bits per OFDM symbol
positive integer
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
numBPSCS
— Number of coded bits per subcarrier per spatial stream
1 | 2 | 4 | 6 | 8
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
y
— Segment-parsed bits
matrix | 3-D array
Segment-parsed 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 is 2. Otherwise it is 1.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2017b
See Also
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)