网站大量收购独家精品文档,联系QQ:2885784924

MIMO OFDM MATLAB仿真程序一.doc

  1. 1、本文档共8页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
MIMO OFDM MATLAB仿真程序一

OFDM.m: OFDM Simulator (outer function) clear all; A = [1 1/exp(1) 1/exp(2)]; % power delay profile N = 64; % number of symbols in a single OFDM symbol GI = 16; % guard interval Mt = 1; % number of Tx antennas Mr = 1; % number of Rx antennas sig2 = 1e-3; % noise variance M = 8; % max constellation bit number Mgap = 10.^(1:(1.7/10):2.7); % gap Btot = 100*Mt; % total # bits per OFDM symbol TransmitIter = 50; % # iterations of symbol transmissions for each channel instance ChannelIter = 100; % # iterations of independent identically distributed channel instances GapIter = length(Mgap); load ENC2.mat load ENC4.mat load ENC16.mat load ENC64.mat load ENC256.mat TotEbNo = []; Errors =[]; EbNo = []; for lGap = 1:GapIter lGap gap = Mgap(lGap); totalErrors = 0; for lChan = 1:ChannelIter % create channel [H h_f]=create_channel(Mt, Mr, A, N+GI); % decompose each subchannel in the frequency domain [U S V] = svd_decompose_channel(Mt, Mr, h_f, N); % bitloading [bits_alloc,energy_alloc] = BitLoad(S,Btot,Mt*N,gap,sig2,M); %energy_alloc=energy_alloc/(mean(energy_alloc)); %energy_alloc=ones(1,128); for lTrans = 1:TransmitIter % bits to transmit x = (randn(1,Btot)0); % modulate x_mod = modulate(x,bits_alloc,energy_alloc, s2,s4,s16,s64,s256); % precode modulated signal x_pre = precode(Mt, x_mod, V, N); % ifft, with cyclic prefix for each antenna ofdm_symbol =[]; for i=1:Mt ofdm_symbol = [ofdm_symbol; ifft_cp_tx_blk(x_pre(i:Mt:Mt*(N-1)+i),N,GI)]; end ofdm_symbol2 = reshape(ofdm_symbol,Mt*(N+GI),1); % channel y = transpose(channel(sig2, Mt, Mr, ofdm_symbol2, H, N+GI)); % fft rec_symbol =[]; for i=1:Mt rec_symbol = [rec_symbol; fft_cp_rx_blk(y(i:Mt:Mt*(N+GI-1)+i),N,GI)]; end rec_symbol2 = reshape(rec_symbol,1,Mt*N); % shape received signal shaped_vals = shape(rec_symbol2, Mr, U, N); % demodulate y_demod = demodulate(shaped_vals, bits_alloc, energy_alloc, S, s2,s4,s16,s64,s256, c2,c4,c16,c64,c256); % comparison totalErrors = totalErrors

文档评论(0)

ligennv1314 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档