资源简介
matlab实现的Polar codes源程序
代码片段和文件信息
function TEB=polart2
N_capteurs=4;
N_relais=N_capteurs;
n=N_capteurs*2;
SNR=[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20];
Nb_pk=1000;
G2=[1 0; 1 1];
if n==2
GG=G2;
elseif n==4
GG=kron(G2G2);
elseif n==8
GG=kron(kron(G2G2)G2);
elseif n==16
GG=kron(kron(kron(G2G2)G2)G2);
elseif n==32
GG=kron(kron(kron(kron(G2G2)G2)G2)G2);
elseif n==64
GG=kron(kron(kron(kron(kron(G2G2)G2)G2)G2)G2);
elseif n==128
GG=kron(kron(kron(kron(kron(kron(G2G2)G2)G2)G2)G2)G2);
elseif n==256
GG=kron(kron(kron(kron(kron(kron(kron(G2G2)G2)G2)G2)G2)G2)G2);
elseif n==512
GG=kron(kron(kron(kron(kron(kron(kron(kron(G2G2)G2)G2)G2)G2)G2)G2)G2);
elseif n==1024
GG=kron(kron(kron(kron(kron(kron(kron(kron(kron(G2G2)G2)G2)G2)G2)G2)G2)G2)G2);
elseif n==2048
GG=kron(kron(kron(kron(kron(kron(kron(kron(kron(kron(G2G2)G2)G2)G2)G2)G2)G2)G2)G2)G2);
end
bhat=zeros(nn);
bhat(11)=0.5;
for a=2:2:n
for b=1:n
if (1<=b) && (b<=a/2)
bhat(ab)=(2*bhat(a/2b)) - (bhat(a/2b))^2;
else if ((a/2)+1<=b) && (b<=a)
bhat(ab)=(bhat(a/2b-(a/2)))^2;
else bhat(ab)=0;
end
end
end
end
bhat=bhat(n:);
bhat;
[val index]=sort(bhat);
lignes=index(1:n/2);
lignes=sort(lignes);
G=GG(lignes:);
coding_rate=1/2;
for m=1:size(SNR2)
for i=1:Nb_pk
sigma(m) = sqrt(10^(-SNR(:m)/10)*(1/coding_rate));
% AWGN noise deviation
u(i:) = (sign(randn(1size(G1)))+1)/2;
% random bits
y(i:) = mod(u(i:)*G2);
% coding
z(i:) = 2*y(i:)-1;
channel=(1/sqrt(2))*(randn(1n)+j*randn(1n));
% channel=randn(1n);
% channel=ones(1n);
% BPSK modulation
zd(i:)=z(i:).*channel;
% zd(i:)=zd(i:)+ (sigma(m)*randn(1n));
zd(i:)=zd(i:)+sigma(m)*(1/sqrt(2))*(randn(1size(G2))+j*randn(1size(G2)));
% AWGN transmission
ze(i:)=conj(channel).*zd(i:);
L1=4*real(ze(i1))/sigma(m)^2;
L2=4*real(ze(i2))/sigma(m)^2;
L3=4*real(ze(i3))/sigma(m)^2;
L4=4*real(ze(i4))/sigma(m)^2;
L5=4*real(ze(i5))/sigma(m)^2;
L6=4*real(ze(i6))/sigma(m)^2;
L7=4*real(ze(i7))/sigma(m)^2;
L8=4*real(ze(i8))/sigma(m)^2;
if (L1>709)
L1=709;
end
if (L2>709)
L2=709;
end
if (L3>709)
L3=709;
end
if (L4>709)
L4=709;
end
if (L5>709)
L5=709;
end
if (L6>709)
L6=709;
end
if (L7>709)
L7=709;
end
if (L8>709)
L8=709;
end
LLR61=log((exp(L3)+exp(L1))/(1+exp(L3+L1)));
if (LLR61>0)
u6=1;
else
u6=0;
end
LLR62=log((exp(L7)+exp(L5))/(1+exp(L7+L5)));
if (LLR62>0)
u6=1;
else
u6=0;
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4224 2013-01-12 22:23 polar_codes\test_sam.m
文件 3954 2013-01-12 22:54 polar_codes\test_sam1.asv
文件 3940 2013-01-12 22:56 polar_codes\test_sam1.m
文件 3939 2013-01-12 22:50 polar_codes\test_sam2.m
文件 4125 2013-01-13 00:08 polar_codes\test_sam3.asv
文件 4319 2013-01-13 00:16 polar_codes\test_sam3.m
目录 0 2013-01-13 01:32 polar_codes
----------- --------- ---------- ----- ----
24501 7
相关资源
- polar code
- 线性偏振片Mueller矩阵计算_Matlab代码
- 基于SCL的1024bit的polar code 的matlab仿真
- polar3d_Matlab
- PolarCode.zip
- polar程序MATLAB编译码
- Polar码SCL译码算法
- 实验室的极化码编码译码仿真程序,
- matlab 极化码仿真sc、scl译码
- polar码编码和译码
- polar码的SC译码算法matlab实现
- MCodes
- Synthetic Aperture Radar Signal Processing wit
- -MATLAB Codes for Finite Element Analysis
- rough-set-codes 天津大学胡清华老师在粗
- CRC_polar_SC_SCL polar码编译码
- 2009CVPR-bestpaperPcodes
- Polar-Codes-New 关于polar 码的SC(Success
- Ch-2.-Matlab-Codes 无源定位的一些仿真代
- polarcode_SCLscheme
- MATLAB-Code 《雷达系统设计MATLAB仿真》
- polar-code-for-AWGN AWGN信道下polar code编译
- polar-matlab
- polar-codes 二进制删除信道下的极化码
- CRC_polar_SC_SCL polar码的SC译码算法
- polar code2 根据华为5G创新大赛polar co
- 2DPCA_Matlab_Codes_PAMI_2004 这里面的代码是
- Progressive-edge-growth
- sc-decoding
- Polar_Codes_in_MATLAB_v2.zip
评论
共有 条评论