classdef (StrictDefaults)h5gPolarDecoder < matlab.System & matlab.system.mixin.Propagates & ...
matlab.system.mixin.CustomIcon
%h5gPolarDecoder Decode input using a polar decoder
% POLARDEC = h5gPolarDecoder creates a polar decoder System object,
% POLARDEC to decode a polar-code encoded bit stream. This object
% uses the CRC-Aided Successive-Cancellation List (CA-SCL) decoding
% algorithm.
%
% POLARDEC = h5gPolarDecoder(Name,Value) creates a polar
% decoder object, POLARDEC, with the specified property Name set to
% the specified Value. You can specify additional name-value pair
% arguments in any order as (Name1,Value1, ... ,NameN,ValueN).
%
% POLARDEC = h5gPolarDecoder(CODEWORDLENGTH,MESSAGELENGTH, ...
% FROZENBITS,LISTLENGTH,CRCLENGTH) creates a polar decoder object,
% POLARDEC, with the CodewordLength property set to CODEWORDLENGTH,
% MessageLength property set to MESSAGELENGTH, FrozenBits property
% set to FROZENBITS, the ListLength property set to LISTLENGTH, and
% the CRCLength property set to CRCLENGTH.
%
% Step method syntax:
%
% Y = step(POLARDEC,INPLLR) decodes the received bits, input as
% log-likelihood ratios, INPLLR, using the CA-SCL decoding algorithm.
% The input is:
% INPLLR: a N-by-1 double column containing log-likelihood ratios
% for each of the received bits.
% The output is:
% Y: a double column vector containing the decoded bits. The size
% of the output is K, where K represents the number of
% information bits encoded.
%
% System objects may be called directly like a function instead of
% using the step method. For example, y = step(obj,x) and y = obj(x)
% are equivalent.
%
% h5gPolarDecoder methods:
%
% step - Perform polar decoding (see above)
% release - Allow property value and input characteristics changes
% clone - Create polar decoder object with same property values
% isLocked - Locked status (logical)
%
% h5gPolarDecoder properties:
%
% CodewordLength - Code word length (N)
% MessageLength - Message length (K)
% FrozenBits - Frozen bit vector of length N (F)
% ListLength - List decoding length (L)
% CRCLength - Number of CRC bits
% DeinterleaveOutput - Deinterleave output
%
% % Example: Transmit polar-encoded block of data and decode using
% % a CRC-Aided Successive Cancellation List decoder.
%
% K = 132; % Message length
% E = 256; % Encoded length
% nMax = 9; % Maximum value of n, Nmax = 2^n
% F = h5gPolarConstruct(K,E,nMax); % {0 info, 1 frozen}
% N = length(F); % Mother code length
% crcLen = 24; % Number of CRC bits
% nVar = 1.5; % Noise variance
% L = 8; % List length
%
% % Object constructions
% polarEnc = h5gPolarEncoder(N,K,F,'InterleaveInput',true);
% bpskMod = comm.BPSKModulator;
% chan = comm.AWGNChannel('NoiseMethod','Variance','Variance',nVar);
% bpskDemod = comm.BPSKDemodulator('DecisionMethod', ...
% 'Approximate log-likelihood ratio', 'Variance',nVar);
% polarDec = h5gPolarDecoder(N,K,F,L,crcLen,'DeinterleaveOutput',true);
%
% % Simulate a frame
% msg = randi([0 1],K-crcLen,1); % Generate a random message
% msgcrc = h5gCRCEncode(msg,'24C'); % CRC encode
% enc = polarEnc(msgcrc); % Polar encode
% mod = bpskMod(enc); % Modulate
% rSig = chan(mod); % Add WGN
% rxLLR = bpskDemod(rSig); % Soft demodulate
% rxBits = polarDec(rxLLR); % Polar decode
%
% % Get bit errors
% numBitErrs = biterr(rxBits(1:K-crcLen), msg);
% disp(['Number of bit errors: ' num2str(numBitErrs)]);
%
% See also h5gPolarEncoder, h5gPolarConstruct.
% Copyright 2017-2018 The MathWorks, Inc.
%#codegen
% References:
% [1] Tal, I, and Vardy, A., "List decoding of Polar Codes", IEEE
% Transactions on Information Theory, vol. 61, No. 5, pp. 2213-2226,
% May 2015.
% [2] Stimming, A. B., Parizi, M. B., and Burg, A., "LLR-Based
% Successive Cancellation List Decoding of Polar Codes", IEEE
% Transaction on Signal Processing, vol. 63, No. 19, pp.5165-5179,
% 2015.
properties (Nontunable)
%CodewordLength Code word length
% Specify the code word length as a positive integer scalar which
% also must be a power of 2. The default is 512.
CodewordLength = 512;
%MessageLength Message length
% Specify the message length as a positive integer scalar. The
% default is 256.
MessageLength = 256;
end
properties (Nontunable)
%FrozenBits Frozen bit vector
% Specify the frozen bit vector as a binary vector of length
% CodewordLength, where a 1-value specifies a frozen bit index
% and a 0-value specifies the information bit index. The number
% of 0's in the vector must be equal to MessageLength. The
% default is [ones(256,1);zeros(256,1)].
%
% See also h5gPolarConstruct.
FrozenBits = [ones(256,1);zeros(256,1)];
end
properties (Nontunable)
%ListLength List decoding length
% Specify the list decoding length as a positive integer scalar.
% The default is 4.
ListLength = 4; % List decoding length
%CRCLength Number of CRC bits used for decoding
% Specify the number of CRC bits used for decoding. A 0-value
% implies no CRC-aided decoding. When enabled, the output decoded
% bits include the CRC bits. Supported values include one of [0 6
% 11 24]. The default is 0.
CRCLength = 0; % CRC length
end
properties (Nontunable, Logical)
%DeinterleaveOutput Deinterleave output
% Specify whether the decoded bits are deinterleaved prior to
% output. The default is true, which corresponds to an iIL value
% of 1.
DeinterleaveOutput = true;
end
properties (Access=private)
% Tal & Vardy data structures
% CodewordLength: N, MessageLength: K, FrozenBits: F
% ListLength: L
m; % log2(N)
br; % bit reversed vector (N-by-1)
arrayPtrLLR; % (m+1)-by-L
arrayPtrC; % (m+1)-by-L
llrPathMetric; % L-by-1
pathIdxToArrayIdx; % (m+1)-by-L
inactiveArrayIndices; % (m+1)-by-L
inactiveArrayIndicesLen;% (m+1)-by-1, (m+1) stack depths
arrayReferenceCount; % (m+1)-by-L
inactivePathIndices; % L-by-1
inactivePathIndicesLen; % 1-by-1, stack depth
activePath; % L-by-1
savedCWs; % N-by-L
crcDet; % CRC-detector
piInterl; % interleaver pattern
end
methods
% Class constructor
function obj = h5gPolarDecoder(varargin)
setProperties(obj, nargin, varargin{:}, 'CodewordLength', ...
'MessageLength', 'FrozenBits', 'ListLength', 'CRCLength');
end
% Set class parameters
function set.CodewordLength(obj,value)
validateattributes(value, {'numeric'}, ...
{'real', 'finite', 'positive', 'integer', 'scalar'}, ...
'', 'CodewordLength');
obj.CodewordLength = value;
end
function set.MessageLength(obj,value)
validateattributes(value, {'numeric'}
没有合适的资源?快使用搜索试试~ 我知道了~
5G NR信号里的matlab生成,SSB块
共61个文件
m:41个
png:15个
html:3个
3星 · 超过75%的资源 需积分: 41 164 下载量 201 浏览量
2018-10-13
15:02:57
上传
评论 17
收藏 634KB ZIP 举报
温馨提示
5G中SSB块中相关信号的生成和在时偏域资源格上的映射,包括SSS、PSS、PBCH和PBCH DMRS的生成与映射
资源推荐
资源详情
资源评论
收起资源包目录
lte5gexamples.zip (61个子文件)
lte5gexamples
h5gSSSIndices.m 453B
h5gDLSCHDecode.m 15KB
5GLDPCBaseGraph.mat 10KB
NewRadio5GLinkExample.m 31KB
h5gPSSIndices.m 430B
h5gLDPCEncode.m 3KB
h5gPolarBitReverse.m 533B
h5gPDSCHDecode.m 19KB
h5gPBCHIndices.m 720B
h5gPolarEncoder.m 10KB
demos.xml 2KB
hPolarBLERSim.m 2KB
h5gPSS.m 1KB
h5gOFDMModulate.m 19KB
h5gRateRecoverLDPC.m 9KB
h5gCRCDecode.m 4KB
h5gDLSCHInfo.m 7KB
h5gPBCH.m 723B
h5gPBCHDMRS.m 770B
h5gPDSCHTBS.m 3KB
h5gSSBurst.m 9KB
NewRadio5GPolarCodingExample.m 14KB
h5gRateMatchPolar.m 3KB
h5gRateRecoverPolar.m 3KB
html
NewRadio5GLinkExample.html 84KB
NewRadio5GLinkExample_01.png 15KB
NewRadio5GSpectralAnalysisExample_03.png 46KB
NewRadio5GLinkExample_02.png 17KB
nr5gPolar.png 63KB
NewRadio5GSpectralAnalysisExample_04.png 28KB
5GAddOnExampleWaveform.png 25KB
nr5gLongRunThroughput.png 20KB
NewRadio5GSpectralAnalysisExample_01.png 38KB
5GAddOnExampleProcessingChain.png 37KB
nr5gPolarL8DL.png 30KB
NewRadio5GPolarCodingExample.html 37KB
NewRadio5GLinkExample.png 3KB
NewRadio5GSpectralAnalysisExample_02.png 46KB
NewRadio5GSpectralAnalysisExample.png 4KB
NewRadio5GSpectralAnalysisExample.html 47KB
nr5gDLPolarCoding.png 103KB
NewRadio5GLinkExample_03.png 19KB
h5gPerfectChannelEstimate.m 3KB
hPolarBLERSimDriver.m 3KB
h5gSSS.m 2KB
Contents.m 558B
h5gPerfectTimingOffset.m 2KB
h5gOFDMDemodulate.m 13KB
h5gCodeBlockDesegment.m 6KB
h5gRateMatchLDPC.m 5KB
NewRadio5GSpectralAnalysisExample.m 17KB
h5gPDSCHResources.m 24KB
h5gCRCEncode.m 5KB
h5gLDPCParityCheckMatrix.m 3KB
h5gPolarDecoder.m 43KB
h5gPBCHDMRSIndices.m 584B
h5gCodeBlockSegment.m 4KB
h5gPolarConstruct.m 3KB
h5gDLSCH.m 13KB
h5gOFDMInfo.m 10KB
h5gLDPCDecode.m 4KB
共 61 条
- 1
qq_27853329
- 粉丝: 10
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页