资源简介
LDPC code 已经用于DVB-S2标准。这个MATLAB程序用来研究LDPC码的性能
代码片段和文件信息
% This program was created by G.Susinder Rajan.
% This program is made freely available under the conditions that
% (1) when they are used the author of the codes and this website(www.geocities.com/susinderrajan) are acknowledged;
% (2) the author of the codes is not liable for any inaccuracies in the materials presented here or any failure of the codes to work as hoped.
% But if u do find a bug please bring it to my notice.
clear all
close all
clc
load ldpcex5.mat
heq=Hc;
clear Hc
f=size(heq);
checks=f(1);
bits=f(2);
db=3; % max degree of bit node
rate=1-checks/bits;
tx=-ones(1bits); % all zero codeword is transmitted( 0-->-1 & 1-->1)
n_iter=200; % no. of iterations
ber=[];
blocker=[];
ebno=[2.75];
for snr=ebno % in dB
no=1/(rate*10^(snr/10));
biterror=0;
nobits=0;
blocks=0;
blockerror=0;
while blockerror<30 % 50 is my choice(i‘m not patient).You need to increase this to get more reliable BER estimates.
pause(0.01)
r=tx+sqrt(no/2).*randn(1bits); % received vector
Lch=-(2/no).*r; % LLR from channel( 0-->-1 & 1-->1)
Lsoft=LDPC_decodekr(Lchheqchecksbitsdbn_iter);
message=tx;
v_decision=-1*sign(Lsoft);
decoded=v_decision;
error=symerr(messagedecoded);
if error>0
biterror=biterror+error;
blockerror=blockerror+1;
end
snr
blocks=blocks+1
biterror
blockerror
end
ber=[ber log10( ((biterror/(blocks*bits)) + ((biterror-error)/((blocks-1)*bits)))/2 )]
blocker=[blocker log10( (blockerror/blocks + (blockerror-1)/(blocks-1))/2 )]
end
plot(ebnoberebnoblocker)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1919 2011-10-13 11:10 LDPC5\LDPC.m
文件 19240 2011-10-13 11:10 LDPC5\ldpcex1.mat
文件 215216 2011-10-13 11:10 LDPC5\ldpcex2.mat
文件 252880 2011-10-13 11:10 LDPC5\ldpcex3.mat
文件 76208 2011-10-13 11:10 LDPC5\ldpcex4.mat
文件 19360 2011-10-13 11:10 LDPC5\ldpcex5.mat
文件 214608 2011-10-13 11:10 LDPC5\ldpcex6.mat
文件 76216 2011-10-13 11:10 LDPC5\ldpcex9.mat
文件 2142 2011-10-13 11:10 LDPC5\ldpc_decode.m
文件 3201 2011-10-13 11:10 LDPC5\LDPC_decodekr.m
文件 122 2011-10-13 11:10 LDPC5\psi.m
文件 64 2011-10-13 11:10 LDPC5\新建 文本文档.txt
目录 0 2011-10-13 11:10 LDPC5
----------- --------- ---------- ----- ----
881176 13
- 上一篇:热力系统计算模型
- 下一篇:本程序是LDPC的Matlab便解码实现
评论
共有 条评论