• 大小: 4KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-06-03
  • 语言: Matlab
  • 标签:

资源简介

通信干扰对齐中,zf算法,mmse算法,ml算法MIMO通信系统的检测器是MIMO技术实用过程中关键的一个模块,选择一种检测性能好而且便于硬件实现的检测方法是人们追求的目标。本文主要介绍几种常见的检测算法,并通过仿真给出各自性能的比较。

资源截图

代码片段和文件信息

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MIMO QPSK(2x2) Simulation Matlab Code          %
% 2013. 03. 11 ~ 15                              %
% Kim Nak Gyun                                   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
clc
echo off
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%   parameters %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

tx = 2;
rx = 2;
N = 500;
Eb_N0_dB = [0:2:30];



for q = 1:length(Eb_N0_dB)

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%  Transmitter  %%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%  Signal  %%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
   input1 = randsrc (2*tx N);
   b=1;
   for a=1:tx
       s0(a:) = input1(2*b-1 :) + (j*input1(2*b :));
       b=b+1;
   end
   

    
        
    for b = 1:N
        %%%%%%%%%%%%%%%%%%%%%%%  AWGN  %%%%%%%%%%%%%%%%%%%%%%%
    for a = 1:tx
        
        n1 = randn(1N)+j*(randn(1N));
        Es = mean((s0.*conj(s0)));
        Eb = Es/2;
        
        No = (Eb/(10^(Eb_N0_dB(q)/10)));
        nn1 = n1/sqrt(mean((n1.*conj(n1))));
        noise1 = sqrt(No).*nn1;
        noise ( a  : ) =( noise1(::));
    end
    SNR_dB = 10*log10(Eb/mean(noise(1:).*conj(noise(1:))));
    
        %%%%%%%%%%%%%%%%%%%%%%%%  Channel  %%%%%%%%%%%%%%%%%%%%%%%
        H = (randn(txrx)+j*randn(txrx)) / sqrt(2);
        
        %%%%%%%%%%%%%%%%%%%%%%%%  Receiver  %%%%%%%%%%%%%%%%%%%%%%%
        Yr(:b) = H * s0(:b) + noise(:b);
        
        
        %%%%%%%%%%%%%%%%%%%  ZF (Zero Forcing)     %%%%%%%%%%%%%%%%
        H_zf = pinv(H);
        Y_zf = H_zf*Yr;
        
        for c = 1 : rx
           
            if real(Y_zf(cb)) >= 0
                re_zf(cb) = 1;
            else
                re_zf(cb) = -1;
            end
            
            if imag(Y_zf(cb)) >=0
                imag_zf(cb) = 1;
            else
                imag_zf(cb) = -1;
            end
            Recon_zf(cb) = sum(re_zf(cb) + (j*imag_zf(cb)));
        end
        
        %%%%%%%%%%%%%%%%%  MMSE (Minimum Mean Square Error)   %%%%%%%%%%%%%%%%
       
        H

评论

共有 条评论

相关资源