- 33
- 0
- 约2.5千字
- 约 3页
- 2017-12-24 发布于河南
- 举报
mimo系统 注水算法
function [gn,en_bar,bn_bar,Nstar,b_bar]=waterfill(P,SNRmfb,Ex_bar,Ntot,gap)% function [gn,en_bar,bn_bar,Nstar,b_bar]=waterfill(P,SNRmfb,Ex_bar,N,gap)%% P is the pulse response% SNRmfb is the SNRmfb in dB% Ex_bar is the normalized energy% Ntot is the total number of real/complex subchannels, Ntot2% gap is the gap in dB%% gn is channel gain% en_bar is the energy/dim in the nth subchannel% bn_bar is the bit/dim in the nth subchannel% Nstar is the number of subchannel used% b_bar is the bit rate% dB into normal scaleNoise_var=Ex_bar*(norm(P)^2)/(10^(SNRmfb/10));gap=10^(gap/10);% initializationen=zeros(1,Ntot);bn=zeros(1,Ntot);gn=zeros(1,Ntot);Hn = zeros(1,Ntot);% subchannel center frequenciesf=-1/2+1/Ntot:1/Ntot:1/2;% find Hn vectorfor i=1:length(P)Hn=Hn+P(i)*exp(j*2*pi*f*(i-1)); % This value will be different depending if P represents % P(1) + P(2)*D^-1 + .... or P(1) + P(2)*D^+1...., % but well get same gn, thus same waterfilling result. % (Note that both have the same magnitude response!)end% find gn vectorgn=abs(Hn).^2/Noise_var;%plot(gn)%%%%%%%%%%%%%%%%%%%%%%%% Now do waterfilling %%%%%%%%%%%%%%%%%%%%%%%%%sort[gn_sorted, Index]=sort(gn); % sort gain, and get Indexgn_sorted = fliplr(gn_sorted);% flip left/right to get the largest % gain in leftsideIndex = fliplr(Index); % also flip index num_zero_gn = length(find(gn_sorted == 0)); %number of zero gain subchannelsNstar=Ntot - num_zero_gn; % Number of used channels, % start from Ntot - (number of zero gain subchannels)while(1) K=1/Nstar*(Ntot*Ex_bar+gap*sum(1./gn_sorted(1:Nstar))); En_min=K-gap/gn_sorted(Nstar);% En_min occurs in the worst channel if (En_min0) Nstar=Nstar-1; % If negative En, continue with less channels else break; % If all En positive, done. endendEn=K-gap./gn_sorted(1:Nstar); % Calculate EnBn=.5*log2(K*gn_sorted(1:Nstar)/gap); % Calculate bnbn(Index(1:Nstar))=Bn;% return values in original indexen(Index(1:Nstar))=En;% return values in original indexmiddle = Ntot/2;% Since cha
您可能关注的文档
- 幼儿元旦节目串词.doc
- Hardinge机床报警信息.doc
- joomla1.5.2安装报错解决方法.doc
- PB程序中在普通激光打印机上实现条码打印.docx
- 世界大学城空间美化教程一.doc
- Cisco ASA5500 配置手册.doc
- 高级英语unit9词汇,翻译,课后习题.doc
- CCNA实验二 静态路由配置.doc
- 超级本重新安装SOP.docx
- ielts 大作文提纲.docx
- 广东省广州省实验中学教育集团2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 广东省广州大学附属中学2025-2026学年八年级上学期奥班期中物理试题(解析版).docx
- 广东省广州市第八十六中学2025-2026学年八年级上学期期中物理试题(含答案).docx
- 广东省广州市第八十九中学2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 广东省广州市第二中学2025-2026学年八年级上学期期中考试物理试题(含答案).docx
- 广东省广州市第八十六中学2025-2026学年八年级上学期期中物理试题(解析版).docx
- 广东省广州市第八十九中学2025-2026学年八年级上学期期中考试物理试题(含答案).docx
- 广东省广州市第二中学2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 2026《中国人寿上海分公司营销员培训体系优化研究》18000字.docx
- 《生物探究性实验教学》中小学教师资格模拟试题.docx
最近下载
- 2025年德州市中考数学试题卷(含答案及解析).docx
- ISO 15614-1-2012 金属材料焊接工艺规范和评定.pdf VIP
- 发那科fanuc维修手册 内部资料教材.pdf VIP
- 2026年节后复工开工第一课课件.ppt
- 蔬菜水果的收货验货标准.doc VIP
- 新部编人教版语文五年级上册生字字帖直接打印资料文档.pdf VIP
- 东北大学2024-2025学年第1学期《高等数学(上)》期末考试试卷(A卷)附参考答案.pdf
- T_DZJN 455-2025 冶金工业变频节能选型设计规范.docx VIP
- 北京邮电大学《机器学习》2024 - 2025 学年第一学期期末试卷.pdf VIP
- 新版2026春重庆大学版英语四年级下册单词表国标手写斜体描红字帖.pdf
原创力文档

文档评论(0)