Eedc3000 2024-11-11 15:49 采纳率: 100%
浏览 19
已结题

LT码在高斯信道下的误码率仿真

请给出LT码在高斯信道下的误码率随信噪比变化的曲线,译码用LLR-BP算法,编码的度分布就用经典的泊松度分布,k=512

  • 写回答

24条回答 默认 最新

  • 夜有梦 2024-11-13 09:13
    关注

    K = 500;
    m = K;
    u = 0;
    degree = 40; %迭代次數
    sigema =sqrt(0.5); % %(0.5/r)10^(-0.1(Eb_N0));% Eb_N0 = 1 ; %单位:dB % n = 10;% r = m/n;%
    P = [0.015 0.495 0.167 0.082 0.071 0.049 0.048 0.05 0.023];
    P_du = [1 2 3 4 5 8 9 19 66];
    sum = 0;
    for i = 1:length(P) %将K换掉
    sum = sum + P(i);
    sum_1(i) = sum;
    end
    sum_1;
    expense = [700,800,900,1000,1100,1200,1300];
    run_freq_1 = 40;
    tol_stats = zeros(7,run_freq_1);
    tol_stats1 = zeros(7,run_freq_1);
    for count_iii = 1:7
    n = expense(count_iii);
    for count_ii = 1:run_freq_1
    Pgenerate = rand(1,n);
    label = zeros(1,n);
    for j_jj = 1:n
    for i_ii = 1:10
    if Pgenerate(j_jj)<=sum_1(i_ii)
    label(j_jj)= P_du(i_ii);
    break;
    end
    end
    end
    label;
    for j = 1:n
    a = zeros(1,m);
    vector = randperm(m,label(j));
    for i = 1:label(j)
    a(vector(i)) = 1;
    end
    G(1:m,j) = a;
    end
    G;
    x_1 = rand(1,m)<0.5;
    y_1 = mod(x_1*G,2);
    for i = 1:length(y_1)
    if y_1(i) == 1
    y_2(i) = -1;
    else
    y_2(i) = 1;
    end
    end
    y_2;
    y_22 = y_2 + sigema*randn(1,n)+u;
    Lch = (2*y_22)/sigema/sigema;
    LchLch = Lch;
    for j = 1:n
    for i = 1:m
    if G(i,j)==1
    Lch_1(j,i) = Lch(j);
    end
    end
    end
    for Loop = 1:degree
    if Loop == 1
    Lvc = zeros(m,n);
    end
    for j = 1:n
    for i = 1:m
    if G(i,j)==1
    prod = 1;
    for k = 1:m
    if G(k,j)==1
    if k=i
    prod = prodtanh(0.5Lvc(k,j));
    end
    end
    end
    Lcv(j,i) = 2atanh((tanh(0.5Lch_1(j,i)))*prod);
    else
    Lcv(j,i) = 0;
    end
    end
    end
    for i = 1:m
    for j = 1:n
    if G(i,j)==1
    sum_Lvc = 0;
    for k = 1:n
    if G(i,k)==1
    if k
    =j
    sum_Lvc=sum_Lvc+Lcv(k,i);
    end
    end
    end
    Lvc(i,j) = sum_Lvc;
    else
    Lvc(i,j) = 0;
    end
    end
    end
    end
    for i = 1:m
    sum = 0;
    for j = 1:n
    sum = sum + Lcv(j,i);
    end
    sum_judge(i) = sum;
    end
    for i = 1:m
    if sum_judge(i)>0
    sum_recode(i) = 0;
    else
    sum_recode(i) = 1;
    end
    end
    sum_recode;
    sum_error = 0;
    for i = 1:m
    if sum_recode(i)~=x_1(i)
    sum_error = sum_error + 1;
    end
    end
    ber = sum_error/m;
    ber1(count_ii)=ber;
    end
    tol_stats(count_iii,1:run_freq_1) = ber1(1,1:run_freq_1);
    end

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(23条)

报告相同问题?

问题事件

  • 系统已结题 11月21日
  • 已采纳回答 11月13日
  • 创建了问题 11月11日

悬赏问题

  • ¥15 分析下图所示同步时序逻辑电路的逻辑功能。
  • ¥15 halcon联合c#遇到了问题不能解决
  • ¥15 xshell无法连接提示ssh服务器拒绝密码
  • ¥15 AT89C52单片机C语言关于串口通信的位操作
  • ¥20 需要步骤截图(标签-服务器|关键词-map)
  • ¥50 gki vendor hook
  • ¥15 灰狼算法和蚁群算法如何结合
  • ¥15 这是一个利用ESP32自带按键和LED控制的录像代码,编译过程出现问题,请解决并且指出错误,指导如何处理 ,协助完成代码并上传代码
  • ¥20 stm32f103,hal库 hal_usart_receive函数接收不到数据。
  • ¥20 求结果和代码,sas利用OPTEX程序和D-efficiency生成正交集