资源简介
本程序仿真了SISO SIMO MISO MIMO(with or without Alamouti Code),并进行了性能比较,有详细的说明文档和公式推导.
The BER performance for the SISO, SIMO, MISO with and without Alamouti, and MIMO with Alamouti is demonstrated in these resources.
代码片段和文件信息
clc;
close all;
clear all;
%% 生成0 1随机信号
len_s=1e5; % 信号长度
sn=randi([01]1len_s); %产生随机信号
%% 采用BPSK生成调制信号
% mod= modem.pskmod(‘M‘ 2 ‘PhaseOffset‘ 0 ‘SymbolOrder‘...
% ‘binary‘ ‘InputType‘ ‘integer‘); %BPSK 调制函数
% mod_sn=modulate(modsn); % 调制信号
mod_sn=pskmod(sn2);
snr=-5:2:25;%信噪比
len_snr=length(snr);
ber_SISO=zeros(1len_snr);
ber_SIMO=zeros(1len_snr);
ber_MISO=zeros(1len_snr);
ber_MISO_stbc=zeros(1len_snr);
ber_MIMO=zeros(1len_snr);
for ii=1:len_snr
sigma =sqrt(0.5.*10.^(-snr(ii)./10));
%% SISO-1*1
Q_noise = randn(1 len_s);
I_noise = randn(1 len_s);
noise = complex(I_noiseQ_noise);
noise = sigma.*noise;%高斯白噪声
h_SISO=1/sqrt(2)*[randn(1len_s) + j*randn(1len_s)];
y_SISO=h_SISO.*mod_sn+noise;
%SISO信号检测
w=(h_SISO).^(-1);
s_det=w.*y_SISO;
s_SISO=pskdemod(s_det2);%BPSK解调
error_SISO=find(s_SISO~=sn);%错误判决
ber_SISO(ii)=length(error_SISO)./len_s;
%% SIMO-1*2
sn_SIMO=ones(21)*mod_sn;
%IQ两路独立产生噪声
Q_noise = randn(2 len_s);
I_noise = randn(2 len_s);
noise = complex(I_noiseQ_noise);
noise = sigma.*noise;%高斯白噪声
% 接收信号
h_SIMO=1/sqrt(2)*[randn(2len_s) + j*randn(2len_s)];
y_SIMO=h_SIMO.*sn_SIMO+noise;
%SIMO信号检测
y_mrc=conj(h_SIMO(1:)).*y_SIMO(1:)+conj(h_SIMO(2:)).*y_SIMO(2:);
w=(abs(h_SIMO(1:)).^2+abs(h_SIMO(2:)).^2).^(-1);
s_det=w.*y_mrc;
s_SIMO=pskdemod(s_det2);%BPSK解调
error_SIMO=find(s_SIMO~=sn);%错误判决
ber_SIMO(ii)=length(error_SIMO)./len_s;
%% MISO-2*1 without STBC
sn_MISO=ones(21)*mod_sn;
%IQ两路独立产生噪声
Q_noise = randn(1 len_s);
I_noise = randn(1 len_s);
noise = complex(I_noiseQ_noise);
noise = sigma.*noise;%高斯白噪声
% 接收信号
h_MISO=1/sqrt(2)*[randn(2len_s) + j*randn(2len_s)];
y_MISO=sum(h_MISO.*sn_MISO1)+noise;
w=sum(h_MISO1).^(-1);
s_det=w.*y_MISO;
s_MISO=pskdemod(s_det2);%BPSK解调
error_MISO=find(s_MISO~=sn);%错误判决
ber_MISO(ii)=length(error_MISO)./len_s;
%% MISO-2*1 with STBC
sn_MISO_stbc=ones(21)*mod_sn;
%IQ两路独立产生噪声
Q_noise = randn(2 len_s);
I_noise = randn(2 len_s);
noise = complex(I_noiseQ_noise);
noise = sigma.*noise;%高斯白噪声
% 接收信号
h_MISO_stbc=1/sqrt(2)*[randn(2len_s) + j*randn(2len_s)];
y_MISO_stbc1=sum(abs(h_MISO_stbc).^21).*sn_MISO_stbc(1:)+conj(h_MISO_stbc(1:)).*noise(1:)+h_MISO_stbc(2:).*conj(noise(2:));
y_MISO_stbc2=sum(abs(h_MISO_stbc).^21).*sn_MISO_stbc(1:)+conj(h_MISO_stbc(2:)).*noise(1:)-h_MISO_stbc(1:).*conj(noise(2:));
w=sum(abs(h_MISO_stbc).^21).^(-1);
s_det1=w.*y_MISO_stbc1;
s_det2=w.*y_MISO_stbc2;
s_MISO_stbc1=pskdemod(s_det12);%BPSK解调
s_MISO_stbc2=pskdemod(s_det22);%BPSK解调
error_MISO_stbc1=find(s_MISO_stbc1~=sn);%错误判决
error_MISO_stbc2=find(s_MISO_stbc2~=sn);%错误判决
ber_MISO_stbc(ii)=(length(error_MISO_stbc1)+length(error_MISO_stbc2))./(2*len_s);
%% MIMO-2*2 with STBC
N = 10^5; % number of bits or symbols
nRx = 2;
% 发射机
ip = rand(1N)>0.5; % generating 01 with equal
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12135 2014-12-28 15:57 BER_Performance.fig
文件 280380 2015-04-27 17:17 Statement.docx
文件 6064 2014-12-25 23:07 Alamouti.m
----------- --------- ---------- ----- ----
298579 3
- 上一篇:MATLAB图论工具箱134097
- 下一篇:基于matlab的信号频域的相干分析
评论
共有 条评论