• m基于MIMO中继通信和非规则LDPC编译码的matlab仿真,其中波束形成为SVD,MMSE,中继包括AF,DF,CF


    目录

    1.算法概述

    2.仿真效果预览

    3.MATLAB部分代码预览

    4.完整MATLAB程序


    1.算法概述

           即在非规则LDPC下,且源节点1个,中继一个,目标节点一个,天线也是1的情况对比三种中继协作协议的误码率。   

           做非规则LDPC码的以编码协作形式中继协议,比较以下三种情况下误码率图和中断概率图:

    源节点一个(配置一根天线),中继节点4个(每个节点配置一根天线),目的节点一个(节点配置一根天线)(1:4:1)

    源节点2个,中继节点4个,目的节点1个(2:4:1)

    源节点1个,中继节点4个,目的节点2个(1:4:2)

    ·141·241·142

     

    2.仿真效果预览

    matlab2022a仿真

    ·接收天线数量一定,噪比不变时性能随着发射天线数的增多而增大,但是提高的能力愈来愈慢。

     

     中继节点的波束成形算法分别使用SVD,MMSESVD-MMSE混合算法,将这三种算法应用到该系统中,比较它们的误码率。

    3.MATLAB部分代码预览

    1. %LDPC参数
    2. N = 2*data_Numbers;%设置奇偶校验矩阵大小
    3. M = N*R;
    4. max_iter = 100; %最大迭代次数
    5. load H;%H=getH(M,N)
    6. load G;%G=getG(M,N);
    7. figure;
    8. imshow(H,[]);title('奇偶校验均值H直观图');
    9. for i=1:length(EbN0)
    10. N0 = 2*10^(-EbN0(i)/10);
    11. Bit_err(i) = 0;
    12. Num_err = 0;
    13. Numbers = 0; %误码率累加器
    14. Dsd=5; %db数
    15. Dsr=4;
    16. Drd=1;
    17. Qsd=sqrt(10^(Dsd/10));
    18. Qsr=sqrt(10^(Dsr/10));
    19. Qrd=sqrt(10^(Drd/10));
    20. while Num_err <= Times
    21. Num_err
    22. fprintf('Eb/N0 = %f\n', EbN0(i));
    23. %产生需要发送的随机数
    24. Trans_data = round(rand(1,N-M));
    25. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    26. %LDPC编码
    27. u = mod(Trans_data*G,2); %LDPC编码
    28. %LDPC编码
    29. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    30. %BPSK
    31. Trans_BPSK = 2*u-1;
    32. %---------------------协作MIMO----------------------------------
    33. %作为发送信源
    34. MIMO_Tx(1,:) = sqrt(Pt)*Trans_BPSK;
    35. %将源信号发送其他几个协作天线上,
    36. %MIMO信道,期间考虑到路径损耗问题。
    37. H_Ray = randn(Ra_num,Ta_num);
    38. for r = 1:Ra_num
    39. for s = 1:Ta_num
    40. H_Ray(s,r) = k2(1)*H_Ray(s,r);
    41. end
    42. end
    43. x = [];
    44. HH = H_Ray;
    45. r = N0;
    46. w = inv(HH'*HH+(1/EbN0(i))*eye(Ta_num))*HH';
    47. y = w*r;
    48. xtemp = (y>=0)-(y<0)+0;
    49. x = [x,xtemp];
    50. a = (x+1)/2;
    51. %进行AF中继
    52. %信道增益
    53. Hsd=Qsd*(randn);
    54. Hsr=Qsr*(randn);
    55. Hrd=Qrd*(randn);
    56. %协作节点的放大增益
    57. B=sqrt(1/(abs(Qsr)^2*1));
    58. %===============================
    59. %最大合并比加权因子计算(第i个支路的可变增益加权系数为该分集之路的信号幅度与噪声功率之比)
    60. %计算增益
    61. A0=conj(Hsd)/(1/EbN0(i));
    62. A1=B*conj(Hsr)*conj(Hrd)/((B^2*(abs(Hsr))^2+1)*(1/EbN0(i)));
    63. %接收
    64. MIMO_Rx = MIMO_Tx/max(max(MIMO_Tx))+ sqrt(N0/2)*randn(size(MIMO_Tx));
    65. Ysr = Hsr*MIMO_Rx;
    66. Yrd = Hrd*Ysr*B;
    67. Ysd = Hsd*MIMO_Rx;
    68. Y = A0*Ysd+A1*Yrd;
    69. Y = k3(1)*Y;
    70. Ysum(1,:,:) = Y;
    71. Y2(:,:) = Ysum(1,:,:);
    72. %接收到的二进制信号
    73. MIMO_Rxs = a*Y2;
    74. MIMO_Rx2 = k3(1:Ta_num)*MIMO_Rxs(:,:);
    75. Rec_data = sign(MIMO_Rx2);
    76. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    77. %LDPC译码
    78. z_hat = func_Dec(Rec_data,N0,H,max_iter);
    79. x_hat = z_hat(size(G,2)+1-size(G,1):size(G,2));
    80. %LDPC译码
    81. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    82. if sum(Rec_data) == 0
    83. nberr = 0;
    84. disp('not count');
    85. else
    86. [nberr,rat] = biterr(Trans_data,x_hat')
    87. end
    88. Num_err = Num_err+nberr;
    89. Numbers = Numbers+1;
    90. end
    91. Bit_err(i)=Num_err/(N*Numbers);
    92. end
    93. 01_038_m

    4.完整MATLAB程序

    matlab源码说明_我爱C编程的博客-CSDN博客

    V

  • 相关阅读:
    codes for entertainment purpose
    WSL2-ubuntu18.04配置笔记 3: 配置ssh远程登陆(局域网)
    MAC苹果电脑关闭系统完整性保护SIP
    Tomcat老是卡住,关不掉怎么办?
    C#进程间通信-匿名管道通信
    数学建模笔记(一)数学建模一般步骤
    物通博联5G工业智能网关赋能智能制造,打造智能工厂
    MySQL 入门教程
    【附源码】计算机毕业设计SSM实验室设备管理系统
    动作捕捉系统用于柔性机械臂的末端定位控制
  • 原文地址:https://blog.csdn.net/hlayumi1234567/article/details/127965283