Have You Used Comm.SphereDecoder System Object For Soft Output?
2 次查看(过去 30 天)
显示 更早的评论
Hi I am Using Comm.SphereDecoder System Object for a simulation. I am using Viterbi Decoder System Object To Decode the Soft Bits.
But BER is Coming Like 0.49.
Anyone is here Experienced the same Problem? Or Any Suggestion? I am Adding my Code Here.
M = 16;
k = log2(M);
nBits = 1e3*log2(M);
noiseVariance = 1e-2;
EbNo = 4;
symMap = [11 10 14 15 9 8 12 13 1 0 4 5 3 2 6 7];
BitTable = de2bi(symMap, log2(M), 'left-msb');
codeRate = 1/2;
constlen = 7;
codegenpoly = [171 133];
tblen = 32;
trellis = poly2trellis(constlen, codegenpoly);
hConvEnc = comm.ConvolutionalEncoder(trellis);
trellis = poly2trellis(7, [171 133])
hMod = comm.RectangularQAMModulator('BitInput', true, ...
'ModulationOrder', M, 'NormalizationMethod', 'Average power',...
'SymbolMapping', 'Custom', 'CustomSymbolMapping', symMap);
hAWGN = comm.AWGNChannel('NoiseMethod', ...
'Signal to noise ratio (SNR)',...
'SNR',10);
hMIMO = comm.MIMOChannel('MaximumDopplerShift', 0, ...
'NumTransmitAntennas', 4, ...
'NumReceiveAntennas', 4, ...
'TransmitCorrelationMatrix', eye(4), ...
'ReceiveCorrelationMatrix', eye(4), ...
'PathGainsOutputPort', true);
hSpDec = comm.SphereDecoder('Constellation', constellation(hMod),...
'BitTable', BitTable, 'DecisionType', 'Soft');
hVitDecSD = comm.ViterbiDecoder(trellis, ...
'InputFormat', 'Unquantized', 'TracebackDepth', tblen);
hBER = comm.ErrorRate;
data = randi([0 1], nBits, 1);
encodedData = step(hConvEnc, data);
yMod = step(hMod, encodedData);
yTx = reshape(yMod, [], 4);
[yFad, yPG] = step(hMIMO, yTx);
yRec = step(hAWGN, yFad);
rxBits = step(hSpDec, yRec, squeeze(yPG));
decDataSD = step(hVitDecSD, rxBits(:));
ber = step(hBER, data, decDataSD);
disp(ber(1));
0 个评论
回答(1 个)
Amit Kansal
2015-11-16
编辑:Walter Roberson
2015-11-16
Couple of issues with the code. The Viterbi Decoder is set to the continuous operation which introduces a delay of tblen bits which is not accounted for in the comparison.
Also, the bit polarity assumed by the SphereDecoder is opposite of that used by the Viterbi Decoder.
Update above respective lines to :
hBER = comm.ErrorRate('ReceiveDelay', tblen);
decDataSD = step(hVitDecSD, -rxBits(:));
to get better ber values.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Link-Level Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!