CTC(卷积涡轮代码)基础知识和规范
本节的MATLAB源代码涵盖了CTC编码器或卷积涡轮代码matlab代码。
卷积涡轮码编码器或CTC编码器下图描述了包括组成编码器。它使用双二进制循环递归系统卷积码。以下是CTC的matlab代码结构在图中定义。
请参考涡轮编码器页面描述基本的CTC编码器或卷积涡轮编码器技术与速度1×3示例用于前向纠错。
卷积编码器和涡轮编码器之间的区别是,在卷积编码器输入比特不保存和修改。在涡轮中编码输入位保存和多路复用与其他正在改变位生成通过编码器和(分界+编码器)模块。
CTC编码器MATLAB代码
函数OutBits = CTCEncoder (InpBits, N, P)
CircularStateTable = [
0 6 4 2 7 1 3 5;
0 1 2 3 4 5 6 7;
0 5 3 2 6 7 1 4;
0 4 1 5 6 2 7 3;
0 2 5 7 1 3 4 6;
0 7 6 1 2 3 4 5);
InitState = (0 0 0);
[垃圾FinalState] = CTCRSCEncoder (InpBits N InitState);
国际扶轮= mod (N, 7);
Ci = FinalState (1) * 4 + FinalState (2) * 2 + FinalState (3);
c = CircularStateTable (Ri, Ci + 1);
InitState地板(1)= (CS / 4);
c = mod (CS, 4);
InitState(2) =地板(CS / 2);
c = mod (CS, 2);
InitState (3) = c;
[p1 FS] = CTCRSCEncoder (InpBits N InitState);
如果总和(FS = = InitState) ~ = 3
disp (P1不匹配)
返回
结束
IB = CTCInterleaver (InpBits, N, P);
InitState = (0 0 0);
[垃圾FinalState] = CTCRSCEncoder (IB, N, InitState);
国际扶轮= mod (N, 7);
Ci = FinalState (1) * 4 + FinalState (2) * 2 + FinalState (3);
c = CircularStateTable (Ri, Ci + 1);
InitState地板(1)= (CS / 4);
c = mod (CS, 4);
InitState(2) =地板(CS / 2);
c = mod (CS, 2);
InitState (3) = c;
[p2 FS] = CTCRSCEncoder (IB, N, InitState);
如果总和(FS = = InitState) ~ = 3
disp (P2不匹配)
返回
结束
OutBits = 0 (6 * N, 1);
k = 0: n - 1
OutBits (6 * k + 1) = InpBits (2 * k + 1);
OutBits (6 * k + 2) = InpBits (2 * k + 2);
OutBits (6 * k + 3) = p1 (2 * k + 1);
OutBits (6 * k + 4) = p2 (2 * k + 1);
OutBits p1 (6 * k + 5) = (2 * k + 2);
OutBits (6 * k + 6) = p2 (2 * k + 2);
结束
CircularStateTable = [
0 6 4 2 7 1 3 5;
0 1 2 3 4 5 6 7;
0 5 3 2 6 7 1 4;
0 4 1 5 6 2 7 3;
0 2 5 7 1 3 4 6;
0 7 6 1 2 3 4 5);
InitState = (0 0 0);
[垃圾FinalState] = CTCRSCEncoder (InpBits N InitState);
国际扶轮= mod (N, 7);
Ci = FinalState (1) * 4 + FinalState (2) * 2 + FinalState (3);
c = CircularStateTable (Ri, Ci + 1);
InitState地板(1)= (CS / 4);
c = mod (CS, 4);
InitState(2) =地板(CS / 2);
c = mod (CS, 2);
InitState (3) = c;
[p1 FS] = CTCRSCEncoder (InpBits N InitState);
如果总和(FS = = InitState) ~ = 3
disp (P1不匹配)
返回
结束
IB = CTCInterleaver (InpBits, N, P);
InitState = (0 0 0);
[垃圾FinalState] = CTCRSCEncoder (IB, N, InitState);
国际扶轮= mod (N, 7);
Ci = FinalState (1) * 4 + FinalState (2) * 2 + FinalState (3);
c = CircularStateTable (Ri, Ci + 1);
InitState地板(1)= (CS / 4);
c = mod (CS, 4);
InitState(2) =地板(CS / 2);
c = mod (CS, 2);
InitState (3) = c;
[p2 FS] = CTCRSCEncoder (IB, N, InitState);
如果总和(FS = = InitState) ~ = 3
disp (P2不匹配)
返回
结束
OutBits = 0 (6 * N, 1);
k = 0: n - 1
OutBits (6 * k + 1) = InpBits (2 * k + 1);
OutBits (6 * k + 2) = InpBits (2 * k + 2);
OutBits (6 * k + 3) = p1 (2 * k + 1);
OutBits (6 * k + 4) = p2 (2 * k + 1);
OutBits p1 (6 * k + 5) = (2 * k + 2);
OutBits (6 * k + 6) = p2 (2 * k + 2);
结束
函数[ParityBits FinState] = CTCRSCEncoder (InpBits N InitState)
% (ParityBits FinState] = CTCRSCEncoder (InpBits N InitState)
% InitState =初始状态的二进制编码器(0 - 7)
% FinState =最终状态的二进制编码器(0 - 7)
负载的CTCEncTable
TNxt = CTCEncTable (:, 6:8);
兜售= CTCEncTable (:, 9:10);
ParityBits = 0 (2 * N, 1);
c = InitState;
k = 0: n - 1
一个= InpBits (2 * k + 1);
B = InpBits (2 * k + 2);
m = c (1) * 16 + CS (2) * 8 + CS (3) * 4 + * 2 + B;
:NS = TNxt (m + 1);
Pb =兜售(m + 1,:);
ParityBits (2 * k + 1) = Pb (1);
ParityBits k + (2 * 2) = Pb (2);
c = NS;
结束
FinState = NS;
% (ParityBits FinState] = CTCRSCEncoder (InpBits N InitState)
% InitState =初始状态的二进制编码器(0 - 7)
% FinState =最终状态的二进制编码器(0 - 7)
负载的CTCEncTable
TNxt = CTCEncTable (:, 6:8);
兜售= CTCEncTable (:, 9:10);
ParityBits = 0 (2 * N, 1);
c = InitState;
k = 0: n - 1
一个= InpBits (2 * k + 1);
B = InpBits (2 * k + 2);
m = c (1) * 16 + CS (2) * 8 + CS (3) * 4 + * 2 + B;
:NS = TNxt (m + 1);
Pb =兜售(m + 1,:);
ParityBits (2 * k + 1) = Pb (1);
ParityBits k + (2 * 2) = Pb (2);
c = NS;
结束
FinState = NS;
函数InterleavedBits = CTCInterleaver (InpBits, N, P)
% InterleavedBits = CTCInterleaver (InpBits, N, P)
% N -输入一些成对的长度
% P - (p0 p1 p2 p3)衬垫参数
InterleavedBits = 0 (2 * N, 1);
ξ= 0 (N, 2);
k = 0: n - 1
m = CTCGetInterleavedAddress (k, N, P);
一个= InpBits (2 * m + 1);
B = InpBits (2 * m + 2);
如果国防部(k, 2) = = 1
InterleavedBits (2 * k + 1) =一个;
InterleavedBits k + (2 * 2) = B;
其他的
InterleavedBits (2 * k + 1) = B;
InterleavedBits k + (2 * 2) = A;
结束
结束
% InterleavedBits = CTCInterleaver (InpBits, N, P)
% N -输入一些成对的长度
% P - (p0 p1 p2 p3)衬垫参数
InterleavedBits = 0 (2 * N, 1);
ξ= 0 (N, 2);
k = 0: n - 1
m = CTCGetInterleavedAddress (k, N, P);
一个= InpBits (2 * m + 1);
B = InpBits (2 * m + 2);
如果国防部(k, 2) = = 1
InterleavedBits (2 * k + 1) =一个;
InterleavedBits k + (2 * 2) = B;
其他的
InterleavedBits (2 * k + 1) = B;
InterleavedBits k + (2 * 2) = A;
结束
结束
MATLAB的有用链接代码
参考以下以及链接提到左侧面板上有用的MATLAB代码。
OFDM序言代时间估计corr频率下估计corr信道估计11 WLAN通道PN序列生成OFDMA Tx的处方AES DES载波聚合CCDF冷杉过滤器IIR滤波器低通冷杉维特比译码器CRC8 CRC32
射频和无线教程
无线局域网802.11交流802.11广告wimax无线个域网z - waveGSMLTEUMTS蓝牙超宽频物联网卫星天线雷达