Alamouti,MRC以及beam三种方式的误码率对比MATLAB仿真程序
完整程序:
clc;
clear;
close all;
warning off;
addpath(genpath(pwd));
%%%%%%%%%%%%%%%%%%%%%%%%% Initialization %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
N = 10^6;
r_n = rand(1,N)>0.5;
BPSK = 2*r_n-1;
E_n_dB = -2:1:15;
E_n_ln = 10.^(E_n_dB/10);
n_rcv = [1 2];
n_trans=2;
th_Ber_ray = 0.5.*(1-sqrt(E_n_ln./(E_n_ln+1)));
p_R_MRC = 1/2 - 1/2*(1+1./E_n_ln).^(-1/2);
th_Ber_R_MRC = p_R_MRC.^2.*(1+2*(1-p_R_MRC));
p_Alamouti = 1/2 - 1/2*(1+2./E_n_ln).^(-1/2);
th_Ber_Alamouti = p_Alamouti.^2.*(1+2*(1-p_Alamouti));
%%%%%%%%%%%%%%%%%%%%%%%%% One by One System %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%