Documentation

wlanBCCDecode

Convolutionally decode input data

Syntax

y = wlanBCCDecode(sym,rate)
y = wlanBCCDecode(sym,rate,decType)
y = wlanBCCDecode(sym,rate,tDepth)
y = wlanBCCDecode(sym,rate,decType,tDepth)

Description

example

y= wlanbccdecode(sym,rate)卷积解码输入sym在指定的rate。bbc在IEEE定义®802.11™-2012节18.3.5.6和20.3.11.6。

y= wlanbccdecode(sym,rate,dectype)指定Viterbi解码算法的解码类型。

example

y= wlanbccdecode(sym,rate,tDepth)指定Viterbi解码算法的追溯深度。

example

y= wlanbccdecode(sym,rate,dectype,tDepth)speficies解码类型和追溯深度。dectypetDepthcan be placed in any order afterrate

Examples

collapse all

通过使用1/2的BCC来解码两个软位编码的软位。

Create the sequence of data bits.

dataBits = randi([0 1],100,1,'int8');

解析IEEE®802.11™-2012第20.3.11.5节和IEEE®802.11AC™-2013第22.3.10.3.10.5.2节中定义的数据位。numESis the number of encoded streams.

numES = 2; parsedData = reshape(dataBits,numES,[]).';

BCC-encode the parsed sequence.

encodedData = wlanBCCEncode(parsedData,'1/2');

将编码的位转换为软位(即LLR解调)。

demoddata = double(1-2*encodeddata);

BCC-decode the demodulated data.

decodedData = wlanBCCDecode(demodData,'1/2');

Deparse the decoded data.

deparsedData = reshape(decodedData.',[],1);

Verify that the decoded data matches the original data.

isequal(dataBits,deparsedData)
ans =logical1

Decode a sequence of soft bits by using a BCC of rate 3/4 and a traceback depth of 60.

Create the sequence of data bits.

dataBits = randi([0 1],300,1);

bcc concode位的序列。

encodedData = wlanBCCEncode(dataBits,3/4);

将编码的位转换为软位(即LLR解调)。

demodData = 1-2*encodedData;

BCC-decode the demodulated bits.

tDepth = 60; decodedData = wlanBCCDecode(demodData,3/4,tDepth);

Verify that the decoded data matches the original data.

que equal(数据代表,解码DATA)
ans =logical1

Decode a sequence of hard bits by using a BCC of rate 3/4 and a traceback depth of 45.

Create the sequence of data bits.

databits = randi([0 1],300,1,'int8');

bcc concode位的序列。

encodedData = wlanBCCEncode(dataBits,'2/3');

在编码位上执行硬BCC解码。指定追溯深度45。

tdepth = 45;解码器= wlanbccdecode(encodeddata,'2/3','hard',tdepth);

Verify that the decoded bits match the original bits.

que equal(数据属,解码器)
ans =logical1

Input Arguments

collapse all

Input sequence of symbols to decode, specified as a numeric matrix of integers. The number of columns must be the number of encoded streams. Each stream is encoded separately. Whendectypeis'soft'或未指定,symmust be a real matrix with log-likelihood ratios. Positive values represent a logical 0 and negative values represent a logical 1.

Data Types:double|int8

代码速率of the binary convolutional code (BCC), specified as a scalar, character array, or string scalar.ratemust be a numeric value equal to 1/2, 2/3, 3/4, or 5/6, or a character vector or string scalar equal to'1/2','2/3','3/4', or'5/6'

Example:'3/4'

Data Types:double|char|string

Decoding type of the binary convolutional code (BCC), specified as a character vector or a string scalar. It can be'hard'for a hard input Viterbi algorithm, or'soft'for a soft input Viterbi algorithm without any quantization.

Data Types:char|string

追溯深度of the Viterbi decoding algorithm, specified as a positive integer less than or equal to the number of input symbols insym

Example:y = wlanBCCDecode(sym,'1/2','hard',50)

Data Types:double

Output Arguments

collapse all

Binary convolutionally decoded output, returned as a binary matrix of integers. The number of rows ofyis equal to the number of rows of inputsym乘以rate, rounded to the next integer. The number of columns ofyis equal to the number of columns ofsym

Data Types:int8

Extended Capabilities

Introduced in R2017b

这个话题有帮助吗?