




已阅读5页,还剩37页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
ii 毕业论毕业论文文 题题 目:目: ldpcldpc 码的编译码算法研究码的编译码算法研究 iii 摘摘 要要 低密度奇偶校验码(low density parity check codes,简称 ldpc 码) ,本 质上是一种线性分组码,更接近香农限。目前的研究均表明 ldpc 码是信道编 码中纠错能力最强的一种码,其译码器结构简单,在深空探测、卫星通信等领域可 得到广泛的应用。文章介绍了 ldpc 码,综述了其编码方法和译码方法。在编码 方法中分别描述了校验矩阵的构造和基于校验矩阵的编码算法,对 ldpc 码的 快速编码方法进行分析。在译码方法中主要论述了消息传递译码算法、置信传 播译码方法、最小和译码算法、比特翻转译码算法和加权比特翻转译码方法。 对部分 ldpc 码的编译码就行了仿真,同时对 ldpc 码的编译码方法的发展及 应用前景作了分析。 本文的重点是对 ldpc 码的编译码算法的论述与研究,介绍 ldpc 码的基 本原理和分类,分别从基于生成矩阵和基于校验矩阵详细讨论了 ldpc 码编码 算法,简单介绍了线性分组码编码,lu 分解法,ru 分解法。并用简明例子对 ru 算法做了清晰的解释。对译码大致做了解释:分为软判决译码(mp 算法) 和硬判决译码(比特翻转算法和加权比特翻转算法) 。在本文的最后用 awgn 信道下 ldpc 码的性能仿真,主要是针对比特翻转算法进行仿真。做出理论比 较。 关键词关键词:ldpc 码 编译码 matlab iv title:encoding and decoding algorithms of ldpc codes abstract:ldpc code, namely low density parity check code, is a kind of linear block codes in nature, and the decoding performance of ldpc is more nearer to the shannon limit. with it s best performance and simple decoder structure, ldpc codes will be widely used in deep space exploration, satellite communications and other fields. while briefly introducing ldpc codes are introduced briefly, this paper summarizes the encoding and decoding algorithms. the encoding algorithm is described in two steps: the const ruction of parity-check matrix and the encoding method based on parity-check matrix. analyze the rapidly coding method for ldpc code. as to decoding algorithm, mp decoding method, bp decoding method, min- sum decoding method, bit-flipping method and weighted bit-flipping method are discussed. emulate for the ldpc codes .the development and application of encoding and decoding methods is analyzed as well. this article focuses on encoding and decoding algorithms of ldpc codes,according to the different methods of decoding algorithm, and makes the theoretical matlab simulation. key words:ldpc codes encoding and decoding matlab iv 目 录 1引言.1 2 ldpc 码概述.3 2.1 线性分组码3 2.2 低密度奇偶校验码(ldpc 码)4 2.2.1 ldpc 码定义4 3 ldpc 码的编码算法.6 3.1 基于生成矩阵的编码算法 (线性分组码编码)6 3. 2 基于校验矩阵的编码算法 (lu 分解法) 7 3.3 基于校验矩阵的编码算法(ru 算法).7 4 ldpc 码的译码概述.11 4.1 mp 算法集 .11 4.2 硬判决译码算法13 4.2.1 比特翻转算法.13 4.2.2 加权比特翻转译码算法.14 5 awgn 信道下 ldpc 码的性能仿真 .15 5.1 仿真软件简介(matlab end else for cc = 1:lc - 1 h(i, c1(cc) = 0; end end % if end % if end % for j end % for i end % if fprintf(ldpc matrix is created.n); function c, newh = makeparitychk(dsource, h, strategy) % generate parity check vector bases on ldpc matrix h using sparse lu decomposition % % dsource : binary source (0/1) % h : ldpc matrix % strategy: strategy for finding the next non-zero diagonal elements % 0 first : first non-zero found by column search 27 % 1 mincol : minimum number of non-zeros in later columns % 2 minprod: minimum product of: % - number of non-zeros its column minus 1 % - number of non-zeros its row minus 1 % % c : check bits % % % copyright bagawan s. nugroho, 2007 % % get the matric dimension m, n = size(h); % set a new matrix f for lu decomposition f = h; % lu matrices l = zeros(m, n - m); u = zeros(m, n - m); % re-order the m x (n - m) submatrix for i = 1:m % strategy 0 = first; 1 = mincol; 2 = minprod switch strategy % create diagonally structured matrix using first strategy case 0 % find non-zero elements (1s) for the diagonal r, c = find(f(:, i:end); % find non-zero diagonal element candidates rowindex = find(r = i); % find the first non-zero column chosencol = c(rowindex(1) + (i - 1); % create diagonally structured matrix using mincol strategy case 1 % find non-zero elements (1s) for the diagonal r, c = find(f(:, i:end); colweight = sum(f(:, i:end), 1); % find non-zero diagonal element candidates rowindex = find(r = i); % find the minimum column weight x, ix = min(colweight(c(rowindex); % add offset to the chosen row index to match the dimension of the. % original matrix f chosencol = c(rowindex(ix) + (i - 1); % create diagonally structured matrix using minprod strategy case 2 % find non-zero elements (1s) for the diagonal 28 r, c = find(f(:, i:end); colweight = sum(f(:, i:end), 1) - 1; rowweight = sum(f(i, :), 2) - 1; % find non-zero diagonal element candidates rowindex = find(r = i); % find the minimum product x, ix = min(colweight(c(rowindex)*rowweight); % add offset to the chosen row index to match the dimension of the. % original matrix f chosencol = c(rowindex(ix) + (i - 1); otherwise fprintf(please select columns re-ordering strategy!n); end % switch % re-ordering columns of both h and f tmp1 = f(:, i); tmp2 = h(:, i); f(:, i) = f(:, chosencol); h(:, i) = h(:, chosencol); f(:, chosencol) = tmp1; h(:, chosencol) = tmp2; % fill the lu matrices column by column l(i:end, i) = f(i:end, i); u(1:i, i) = f(1:i, i); % there will be no rows operation at the last row if i = length(r1) - numofones + rji(r1(k), j) qij(r1(k), j) = 1; else qij(r1(k), j) = 0; 30 end end % for k % bit decoding if numofones + ci(j) = length(r1) - numofones vhat(j) = 1; else vhat(j) = 0; end end % for j end % for n function vhat = decodeprobdomain(rx, h, n0, iteration) % probability-domain sum product algorithm ldpc decoder % % rx : received signal vector (column vector) % h : ldpc matrix % n0 : noise variance % iteration : number of iteration % % vhat : decoded vector (0/1) % % % copyright bagawan s. nugroho, 2007 % m n = size(h); % prior probabilities p1 = ones(size(rx)./(1 + exp(-2*rx./(n0/2); p0 = 1 - p1; % initialization k0 = zeros(m, n); k1 = zeros(m, n); rji0 = zeros(m, n); rji1 = zeros(m, n); qij0 = h.*repmat(p0, m, 1); qij1 = h.*repmat(p1, m, 1); % iteration for n = 1:iteration fprintf(iteration : %dn, n); % - horizontal step - for i = 1:m % find non-zeros in the column c1 = find(h(i, :); for k = 1:length(c1) 31 % get column products of drjic1(l) drji = 1; for l = 1:length(c1) if l= k drji = drji*(qij0(i, c1(l) - qij1(i, c1(l); end end % for l rji0(i, c1(k) = (1 + drji)/2; rji1(i, c1(k) = (1 - drji)/2; end % for k end % for i % - vertical step - for j = 1:n % find non-zeros in the row r1 = find(h(:, j); for k = 1:length(r1) % get row products of prodofrijri(l) prodofrij0 = 1; prodofrij1 = 1; for l = 1:length(r1) if l= k prodofrij0 = prodofrij0*rji0(r1(l), j); prodofrij1 = prodofrij1*rji1(r1(l), j); end end % for l % update constants k0(r1(k), j) = p0(j)*prodofrij0; k1(r1(k), j) = p1(j)*prodofrij1; % update qij0 and qij1 qij0(r1(k), j) = k0(r1(k), j)./(k0(r1(k), j) + k1(r1(k), j); qij1(r1(k), j) = k1(r1(k), j)./(k0(r1(k), j) + k1(r1(k), j); end % for k % update constants ki0 = p0(j)*prod(rji0(r1, j); ki1 = p1(j)*prod(rji1(r1, j); % get qj qi0 = ki0/(ki0 + ki1); qi1 = ki1/(ki0 + ki1); % decode qj if qi1 qi0 vhat(j) = 1; else vhat(j) = 0; end 32 end % for j end % for n function vhat = decodelogdomainsimple(rx, h, iteration) % simplified log-domain sum product algorithm ldpc decoder % % rx : received signal vector (column vector) % h : ldpc matrix % iteration : number of iteration % % vhat : decoded vector (0/1) % % % copyright bagawan s. nugroho, 2007 % m n = size(h); % prior log-likelihood (simplified). minus sign is used for 0/1 to -1/1 mapping lci = -rx; % initialization lrji = zeros(m, n); pibetaij = zeros(m, n); % asscociate the l(ci) matrix with non-zero elements of h lqij = h.*repmat(lci, m, 1); for n = 1:iteration fprintf(iteration : %dn, n); % get the sign and magnitude of l(qij) alphaij = sign(lqij); betaij = abs(lqij); % - horizontal step - for i = 1:m % find non-zeros in the column c1 = find(h(i, :); % get the minimum of betaij for k = 1:length(c1) % minimum of betaijc1(k) minofbetaij = realmax; for l = 1:length(c1) if l = k if betaij(i, c1(l) minofbetaij minofbetaij = betaij(i, c1(l); end 33 end end % for l % multiplication alphaijc1(k) (use * since alphaij are -1/1s) prodofalphaij = prod(alphaij(i, c1)*alphaij(i, c1(k); % update l(rji) lrji(i, c1(k) = prodofalphaij*minofbetaij; end % for k end % for i % - vertical step - for j = 1:n % find non-zero in the row r1 = find(h(:, j); for k = 1:length(r1) % update l(qij) by summation of l(rij)r1(k) lqij(r1(k), j) = lci(j) + sum(lrji(r1, j) - lrji(r1(k), j); end % for k % get l(qij) lqi = lci(j) + sum(lrji(r1, j); % decode l(qi) if lqi 0 vhat(j) = 1; else vhat(j) = 0; end end % for j end % for n function vhat = decodelogdomain(rx, h, n0, iteration) % log-domain sum product algorithm ldpc decoder % % rx : received signal vector (column vector) % h : ldpc matrix % n0 : noise variance % iteration : number of iteration % % vhat : decoded vector (0/1) % % % copyright bagawan s. nugroho, 2007 % m n = size(h); 34 % prior log-likelihood. minus sign is used for 0/1 to -1/1 mapping lci = (-4*rx./n0); % initialization lrji = zeros(m, n); pibetaij = zeros(m, n); % asscociate the l(ci) matrix with non-zero elements of h lqij = h.*repmat(lci, m, 1); % get non-zero elements r, c = find(h); % iteration for n = 1:iteration fprintf(iteration : %dn, n); % get the sign and magnitude of l(qij) alphaij = sign(lqij); betaij = abs(lqij); for l = 1:length(r) pibetaij(r(l), c(l) = log(exp(betaij(r(l), c(l) + 1)/. (exp(betaij(r(l), c(l) - 1); end % - horizontal step - for i = 1:m % find non-zeros in the column c1 = find(h(i, :); % get the summation of pi(betaij) for k = 1:length(c1) sumofpibetaij = 0; prodofalphaij = 1; % summation of pi(betaij)c1(k) sumofpibetaij = sum(pibetaij(i, c1) - pibetaij(i, c1(k); % avoid division by zero/very small number, get pi(sum(pi(betaij) if sumofpibetaij 1e-20 sumofpibetaij = 1e-10; end pisumofpibetaij = log(exp(sumofpibetaij) + 1)/(exp(sumofpibetaij) - 1); % multiplication of alphaijc1(k) (use * since alphaij are -1/1s) prodofalphaij = prod(alphaij(i, c1)*alphaij(i, c1(k); % update l(rji) lrji(i, c1(k) = prodofalphaij*pisumofpibetaij; end % for k end % for i 35 % - vertical step - for j = 1:n % find non-zero in the row r1 = find(h(:, j); for k = 1:length(r1) % update l(qij) by summation of l(rij)r1(k) lqij(r1(k), j) = lci(j) + sum(lrji(r1, j) - lrji(r1(k), j); end % for k % get l(qi) lqi = lci(j) + sum(lrji(r1, j); % decode l(qi) if lqi 0 vhat(j) = 1; else vhat(j) = 0; end end % for j end % for n 36 毕业设计(论文)原创性声明和使用授权说明毕业设计(论文)原创性声明和使用授权说明 原创性声明原创性声明 本人郑重承诺:所呈交的毕业设计(论文) ,是我个人在指导教 师的指导下进行的研究工作及取得的成果。尽我所知,除文中特别 加以标注和致谢的地方外,不包含其他人或组织已经发表或公布过 的研究成果,也不包含我为获得 及其它教育机构的学位 或学历而使用过的材料。对本研究提供过帮
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年上海市疾病预防控制中心(上海市预防医学科学院)初级岗位公开招聘考前自测高频考点模拟试题及答案详解(名校卷)
- 2025安康市石泉县幼儿园招聘(2人)考前自测高频考点模拟试题及答案详解(考点梳理)
- 2025北京市大兴区教育委员会所属事业单位第二批招聘教师251人考前自测高频考点模拟试题带答案详解
- 2025北京市海淀区育鹰小学招聘5人模拟试卷及完整答案详解
- 2025年阜阳颍上县人民医院公开招聘社会化用人48人考前自测高频考点模拟试题及1套参考答案详解
- 2025年河北秦皇岛昌黎第一中学招聘教师若干名模拟试卷及1套完整答案详解
- 2025年甘肃省平凉市灵台县粮油购销储备有限责任公司招聘会计人员模拟试卷及1套完整答案详解
- 2025年德州武城县公开招聘省属公费师范毕业生(36名)考前自测高频考点模拟试题带答案详解
- 2025河南洛阳市偃师区第一批公益性岗位招聘40人考前自测高频考点模拟试题及参考答案详解1套
- 2025广西城轨工程建设有限公司招聘20人考前自测高频考点模拟试题及答案详解1套
- 2025年及未来5年中国电子天平市场前景预测及行业投资潜力预测报告
- 2025年国网江苏省电力有限公司校园招聘450人(提前批)笔试参考题库附带答案详解
- 美甲老师教学员课件
- 2025江苏南京栖霞区发改委编外工作人员招聘1人备考考试题库附答案解析
- DB11∕T 1810-2020 装配式抗震支吊架施工质量验收规范
- 2025-2026学年统编版(2024)七年级道德与法治第一学期第一单元 少年有梦 单元练习卷 (含答案)
- 颈肩腰腿痛门诊诊疗课件
- 做有梦想的少年+课件-2025-2026学年统编版道德与法治七年级上册
- 财务内账表格大全-出纳实 用模板
- 糖尿病护理操作规范手册(2023修订)
- 产后腹直肌分离的诊断与治疗
评论
0/150
提交评论