99273911MU_MIMO.zip

  • e1_375150
    了解作者
  • 7.5KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-14 05:11
    上传日期
多用户MIMO预编码的Matlab代码,亲测可用,注释清晰且完整,可二次开发!
99273911MU_MIMO.zip
  • MU_MIMO 预编码对比
  • MMSE.m
    755B
  • waterfilling.m
    317B
  • ZF.m
    92B
  • sumrate.m
    1.4KB
  • main1.m
    4.6KB
  • receiver.m
    565B
  • BD2.m
    1001B
  • SLNR2.m
    464B
  • MF.m
    82B
  • SLNR.m
    531B
  • QPSK_mapper.m
    476B
  • BD.m
    961B
  • main2.m
    4.5KB
  • svdprecoding.m
    135B
内容介绍
clear all; clc; Nt =4; K = 2; Nri = 2; S = 2; Tc = 200; sigma2=1; SNRdbs=-10:3:30; sum_rate1=zeros(1,length(SNRdbs)); sum_rate2=zeros(1,length(SNRdbs)); sum_rate3=zeros(1,length(SNRdbs)); sum_rate4=zeros(1,length(SNRdbs)); sum_rate5=zeros(1,length(SNRdbs)); sum_rate6=zeros(1,length(SNRdbs)); BER1=zeros(1,length(SNRdbs)); BER2=zeros(1,length(SNRdbs)); BER3=zeros(1,length(SNRdbs)); BER4=zeros(1,length(SNRdbs)); BER5=zeros(1,length(SNRdbs)); BER6=zeros(1,length(SNRdbs)); for i_SNR=1:length(SNRdbs) SNR=10^(SNRdbs(1,i_SNR)/10); P=sigma2*SNR; count1=0; count2=0; count3=0; count4=0; count5=0; count6=0; capacity1=0; capacity2=0; capacity3=0; capacity4=0; capacity5=0; capacity6=0; loop_num=400; for i_loop=1:loop_num q=randint(K*S,Tc); s=QPSK_mapper(q,Tc,S,K); H_real=randn(K*Nri,Nt); H_imag=randn(K*Nri,Nt); H=(1/sqrt(2))*complex(H_real,H_imag); n_real=sqrt(sigma2/2)*randn(K*Nri,Tc/2); n_imag=sqrt(sigma2/2)*randn(K*Nri,Tc/2); n=complex(n_real,n_imag); %svd [W1,M1]=svdprecoding(H,K,S,P); [U,D,V]=svd(H); p1 = ones(1,K*S); % p1 = waterfilling(D,SNR,Nt,K,S); [count_temp] = receiver(H,Nt,S,K,Tc,P,n,W1,M1,s,q); count1=count1+count_temp; G=M1*H*W1; capacity1=capacity1+log2(det(eye(K*S,K*S)+P/(sigma2*Nt)*G*G')); % BD [W2,D2 M2] = BD2(Nt,Nri,S,K,H,P); p2 = ones(1,K*S); [count_temp] = receiver(H,Nt,S,K,Tc,P,n,W2,M2,s,q); count2=count2+count_temp; capacity2=capacity2+sumrate(H,W2,M2,K,S,Nri,Nt,sigma2,P); %ZF [W3]=ZF(H,P,K,S); [count_temp] = receiver(H,Nt,S,K,Tc,P,n,W3,eye(K*Nri),s,q); count3=count3+count_temp; capacity3=capacity3+sumrate(H,W3,eye(K*Nri),K,S,Nri,Nt,sigma2,P); %MF [W4]=MF(H,P,K,S); [count_temp] = receiver(H,Nt,S,K,Tc,P,n,W4,eye(K*Nri),s,q); count4=count4+count_temp; capacity4=capacity4+sumrate(H,W4,eye(K*Nri),K,S,Nri,Nt,sigma2,P); %SLNR %[W5] = SLNR(Nt,Nri,S,K,H,sigma2,P); [W5]=SLNR2(H,sigma2,P,K,Nri,S,Nt); [count_temp] = receiver(H,Nt,S,K,Tc,P,n,W5,eye(K*Nri),s,q); count5=count5+count_temp; capacity5=capacity5+sumrate(H,W5,eye(K*Nri),K,S,Nri,Nt,sigma2,P); %MMSE [W6,M6]=MMSE(H,sigma2,P,K,Nri,S,Nt); [count_temp] = receiver(H,Nt,S,K,Tc,P,n,W6,M6,s,q); count6=count6+count_temp; capacity6=capacity6+sumrate(H,W6,M6,K,S,Nri,Nt,sigma2,P); end BER1(1,i_SNR)=count1/(loop_num*K*S*Tc); BER2(1,i_SNR)=count2/(loop_num*K*S*Tc); BER3(1,i_SNR)=count3/(loop_num*K*S*Tc); BER4(1,i_SNR)=count4/(loop_num*K*S*Tc); BER5(1,i_SNR)=count5/(loop_num*K*S*Tc); BER6(1,i_SNR)=count6/(loop_num*K*S*Tc); sum_rate1(1,i_SNR)=capacity1/loop_num/K; sum_rate2(1,i_SNR)=capacity2/loop_num/K; sum_rate3(1,i_SNR)=capacity3/loop_num/K; sum_rate4(1,i_SNR)=capacity4/loop_num/K; sum_rate5(1,i_SNR)=capacity5/loop_num/K; sum_rate6(1,i_SNR)=capacity6/loop_num/K; end figure(1) semilogy(SNRdbs,BER1(1,:),'b-o'); hold on; semilogy(SNRdbs,BER2(1,:),'r-<'); hold on; semilogy(SNRdbs,BER3(1,:),'c-p'); hold on; semilogy(SNRdbs,BER4(1,:),'k-s'); hold on; semilogy(SNRdbs,BER5(1,:),'y-*'); grid on; semilogy(SNRdbs,BER6(1,:),'g-o'); grid on; legend('SVD','BD','ZF','MF','SLNR','MMSE'); xlabel('SNR (dB)'); ylabel('BER'); hold on; title('SNR=10dB时2个2天线用户MIMO系统误码率随Nt变化'); figure(2) plot(SNRdbs,sum_rate1(1,:),'b-o'); hold on; plot(SNRdbs,sum_rate2(1,:),'r-<'); hold on; plot(SNRdbs,sum_rate3(1,:),'c-p'); hold on; plot(SNRdbs,sum_rate4(1,:),'k-s'); hold on; plot(SNRdbs,sum_rate5(1,:),'y-*'); grid on; plot(SNRdbs,sum_rate6(1,:),'g-o'); grid on; legend('SVD','BD','ZF','MF','SLNR','MMSE'); xlabel('SNR (dB)'); ylabel('合速率(bit/s/用户)'); hold on; title('SNR=10dB时2个2天线用户MIMO系统合速率随Nt变化');
评论
    相关推荐
    • Matlab合集
      冈萨雷斯数字图像处理MATLAB版.中文版+数字图像处理第二版中文版(冈萨雷斯)+MATLAB-R2014a完全自学一本通+MATLAB R2016a完全自学一本通 素材文件+[模式识别与智能计算:MATLAB技术实现(第2版)].杨淑莹.扫描版
    • Matlab教程
      MatlaB经典ppt,主要讲解了MatlaB的入门知识,图形编程以及仿真。
    • matlab 课件
      matlab 功能很强大,本课件详细的介绍了matlab在科学计算中的应用。
    • matlab编译器
      matlab编译为exe文件所需要的文件; 使用时解压,将解压后文件拖入至matlab命令行即可
    • matlab
      matlab的基础知识进行介绍
    • MatLab
      “#MatLab
    • MATLAB编译器
      基于MATLAB 2018b版本介绍MATLAB编译器。介绍如何利用编译器将MATLAB代码编译为独立应用程序或组件,并在没有安装MATLAB的计算机上进行部署。
    • matlab入门
      matlab的入门教程,很值得仔细看看,对提高matlab能力有帮助
    • matlab
      matlab经典课堂讲义
    • matlab
      matlab