资源简介
MIMO——OFDM系统中采用SFBC方式传输以改善误码率性能
代码片段和文件信息
clear all;
Nt=2;
Nr=1;
M=4;
Sdata=256; % 256 data symbol per frame to ifft
Slen=256;
Nsym=200;% 帧数
GI=Sdata/4;% guard interval length
GIlen=GI+Slen;% symbol with GI insertion
Ndata=Sdata*Nsym; % all transmitted data symbol
%A=[1 1/exp(0.5) ];%功率时延谱
% h1=[10.5];
h1=[1 0.5 0.25];
H1=diag(fft(h1Sdata+GI));
% h2=[10.6];
h2=[1 0.5 0.25];
H2=diag(fft(h2Sdata+GI));
SNR=0:2:20;
constellation=qammod((0:M-1)M);
tx_bit = randint(Ndata1 M);
S1=[];
S2=[];
for ii=1:length(SNR)
error=0;
for jj=1:Nsym
G1=[];
G2=[];
x=zeros(Sdata1);
for i=1:Sdata
y(i)=tx_bit(i+(jj-1)*Sdata);
y=y.‘;
end
y_sym=qammod(yM);
% for k=1:Sdata/2
% S1(2*k-1)=y_sym(2*k-1);
% S1(2*k)=-conj(y_sym(2*k));
% S2(2*k-1)=(y_sym(2*k));
% S2(2*k)=conj(y_sym(2*k-1));
%
% end
% S1_ofdm=ifft(S1);
% S2_ofdm=ifft(S2);
% for i=1:Sdata
% G1(i+GI)=S1_ofdm(i);
% G2(i+GI)=S2_ofdm(i);
% end
% for i=1:GI
% G1(i)=S1_ofdm(i+Sdata-GI);
% G2(i)=S2_ofdm(i+Sdata-GI);
% end
% G1=G1.‘;
% G2=G2.‘;
% [H h_f]=creat_channel(NtNrASdata+GI);
% for i=1:(Sdata+GI)
% G(2*i-1)=G1(i);
% G(2*i)=G2(i);
% end
% G=G.‘;
% x=H*G;
% x=x+sqrt(0.5/(10^(SNR(ii)/10)))*(randn(size(x))+j*randn(size(x)));
% x=H1*G1+H2*G2;
% rec_time_symbol=x(GI+1:end);
% rec_symbol=fft(rec_
评论
共有 条评论