您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 经营企划 > Okumura-Hata-模型的计算机仿真
实验基本原理及公式移动通信中电波传播的实际情况是复杂多变的。实践证明,任何试图使用一个或几个理论公式计算的结果,都将引入较大误差。甚至与实测结果相差甚远。为此,人们通过大量的实地测量和分析,总结归纳了多种经验模型。通常在一定情况下,使用这些模型对移动通信电波传播特性进行估算,都能获得比较准确的预测结果。目前应用较为广泛的是OM模型(Okumura模型),为了在系统设计时,使Okumura模型能采用计算机进行预测,Hata对Okumura模型的基本中值场强曲线进行了公式化处理,所得基本传输损耗的计算公式如下:式中,d为收发天线之间的距离,km;f为工作频率,MHz;hb为基站天线有效高度,m;α(hm)为移动台天线高度校正因子,hm为移动台天线高度(m)。α(hm)由下式计算:此公式适用范围为:150MHz≤f≤1920MHz30m≤hb≤200m,1m≤hm≤10m,1km≤d≤20km,准平滑地形。实验内容1、比较不同地形下的衰减情况:针对市区、郊区和开阔区,比较在相同条件(基站天线高度、移动台天线高度、传播距离)下,随着频率的改变,电波传播衰减的情况。2、比较相同地形不同城市类型下的衰减情况:针对市区、郊区或者开阔区任一种地形,比较在相同条件(基站天线高度、移动台天线高度、传播距离)下,不同城市类型(大城市或者中、小城市),随着频率的改变,电波传播衰减的情况。实现代码:#includestdio.h#includemath.hfloatcomputer1(float*p,float*q,floath1,floath2);floatcomputer2(float*p,float*q,floath1,floath2);floatcomputer3(float*p,float*q,floath1,floath2);floatcomputer5(float*p,float*q,floath1,floath2);floatcomputer4(float*p,float*q,floath1,floath2);floatcomputer6(float*p,float*q,floath1,floath2);voidmain(){floatfrequency,distan,height1,height2;inteara,type;for(;;){printf(chooseyoureara:\n\t1.cityeara\n\t2.suburban\n\t3.openeara\n);scanf(%d,&eara);if(eara==1){printf(chooseyourcity:\n\t1.big\n\t2.smallandmidd\n);scanf(%d,&type);}printf(inputthefrequency\n);scanf(%f,&frequency);printf(inputyourdistance\n);scanf(%f,&distan);printf(inputyourheightofjizhan\n);scanf(%f,&height1);printf(inputyourheightofmobile\n);scanf(%f,&height2);if(frequency1920||frequency150){printf(yourfrequencyisillegal\n);continue;}elseif(height1200||height120){printf(yourjizhanisillegal\n);continue;}elseif(height210||height21){printf(yourheightofmobileisillegal\n);continue;}elseif(distan20||distan1){printf(yourdistanceisillegal\n);continue;}switch(eara){case1:{if(type==1)printf(%.3f,computer1(&frequency,&distan,height1,height2));elseprintf(%.3f,computer4(&frequency,&distan,height1,height2));}break;case2:printf(%.3f,computer2(&frequency,&distan,height1,height2));break;case3:printf(%.3f,computer3(&frequency,&distan,height1,height2));break;default:printf(someinputofyoursiserror);}}}floatcomputer1(float*p,float*q,floath1,floath2){floatm,n;if(*p=300)m=computer5(p,q,h1,h2);elsem=computer6(p,q,h1,h2);n=69.55+26.16*log10(*p)-13.82*log10(h1)-m+(44.9-6.55*log10(h2))*log10(*q);returnn;}floatcomputer2(float*p,float*q,floath1,floath2){return(computer1(p,q,h1,h2)-2*pow(log10(*p/28),2)-5.4);}floatcomputer3(float*p,float*q,floath1,floath2){return(computer1(p,q,h1,h2)-4.78*pow(log10(*p),2)+18.33*log10(*p)-40.98);}floatcomputer5(float*p,float*q,floath1,floath2){floatm;m=8.29*pow(2,log10(1.54*h2))-1.1;returnm;}floatcomputer6(float*p,float*q,floath1,floath2){return(3.2*pow(2,log10(11.75*h2))-4.97);}floatcomputer4(float*p,float*q,floath1,floath2){floatm,n;n=(1.1*log10(*p)-0.7)-1.56*log10(*p)+0.8;m=69.55+26.16*log10(*p)+13.82*log10(*q)-n+(49.9-6.55*log10(h1));returnm;}
本文标题:Okumura-Hata-模型的计算机仿真
链接地址:https://www.777doc.com/doc-4982412 .html