实现信道估计算法的MATLAB仿真.doc
《实现信道估计算法的MATLAB仿真.doc》由会员分享,可在线阅读,更多相关《实现信道估计算法的MATLAB仿真.doc(5页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、实现信道估计算法的matlab仿真clear all;%close all;i=sqrt(-1);Rayleigh=1;AWGN=0; % for AWGN channel MMSE=0; % estimation techniqueNsc=64; % Number of subcarriersNg=16; % Cyclic prefix lengthSNR_dB=0 5 10 15 20 25 30 35 40;% Signal to noise ratioMt=2; % Number of Tx antennasMr=2; % Number of Rx antennaspilots=1:N
2、sc/Ng:Nsc; % pilot subcarriers DS=5; % Delay spread of channeliteration_max=200;% Channel impulse response %if (Rayleigh) N=50; fm=100; B=20e3; fd=(rand(1,N)-0.5)*2*fm; theta=randn(1,N)*2*pi; c=randn(1,N); c=c/sum(c.2); t=0:fm/B:10000*fm/B; Tc=zeros(size(t); Ts=zeros(size(t); for k=1:N Tc=c(k)*cos(2
3、*pi*fd(k)*t+theta(k)+Tc; Ts=c(k)*sin(2*pi*fd(k)*t+theta(k)+Ts; end r=ones(Mt*Mr,1)*(Tc.2+Ts.2).0.5; index=floor(rand(Mt*Mr,DS)*5000+1);endMEE1=zeros(1,length(SNR_dB);MEE2=zeros(1,length(SNR_dB);for snrl=1:length(SNR_dB) snrl estimation_error1=zeros(Mt*Mr,Nsc); estimation_error2=zeros(Mt*Mr,Nsc); R1=
4、besselj(0,2*pi*fm*(Nsc+Ng)/B); sigma2=10(-SNR_dB(snrl)/10); aa=(1-R12)/(1-R12+sigma2); bb=sigma2*R1/(1-R12+sigma2); for iteration=1:iteration_max %iteration if AWGN=1 h=ones(Mt*Mr,1); else phi=rand*2*pi; h=r(index+iteration)*exp(j*phi); %h=rand(Mt*Mr,DS); h=h.*(ones(Mt*Mr,1)*(exp(-0.5).1:)S); h=h./(
5、sqrt(sum(abs(h).2,2)*ones(1,DS); end CL=size(h,2); % channel length data_time=zeros(Mt,Nsc+Ng); data_qam=zeros(Mt,Nsc); data_out=zeros(Mr,Nsc); output=zeros(Mr,Nsc); for tx=1:Mt data_b=0*round(rand(4,Nsc); % data data_qam(tx,:) =j*(2*(mod(data_b(1, :)+data_b(2, :),2)+2*data_b(1, :)-3)+. 2*(mod(data_
6、b(3, :)+data_b(4,:),2)+2*data_b(3,:)-3; for loop=1:Mt data_qam(tx,pilots+loop-1)=(1+j)*(loop=tx); % pilots end data_time_temp=ifft(data_qam(tx,:); data_time(tx,:)=data_time_temp(end-Ng+1:end) data_time_temp; end for rx=1:Mr for tx=1:Mt output_temp=conv(data_time(tx,:),h(rx-1)*Mt+tx,:); output(rx,:)=
7、output_temp(Ng+1:Ng+Nsc)+output(rx,:); end np=(sum(abs(output(rx,:).2)/length(output(rx,:)*sigma2; noise=(randn(size(output(rx,:)+i*randn(size(output(rx,:)*sqrt(np); output(rx,:)=output(rx,:)+noise; data_out(rx,:)=fft(output(rx,:); end% Channel estimation % H_act=zeros(Mt*Mr,Nsc); H_est1=zeros(Mt*Mr
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 实现 信道 估计 算法 MATLAB 仿真
限制150内