COST231-WI模型通道模擬,原始碼模擬matlab程式設計原始碼

fpga&matlab發表於2020-12-24

%%%%%%%%%%%%%%%COST231-WI非視距傳播模型%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%適用條件f=800-2000MHz;Hb=4-50m;Hm=1-3m;d=0.02-5km%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%發射功率f(MHz),收發天線距離(小區半徑)d(km)%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%移動臺高度Hm(m),基站高度Hb(m)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%建築物屋頂高度Hroof(m),道路寬度w(m),建築物間隔b(m)%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%相對直接無線路徑的道路方向性Phi(度)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%Model=1;中等規模城市和植被覆蓋密度適中的郊區中心%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%Model=2;大城市的中心%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function y=wireless_Walfish_Ikegami_NLOS_attenuation(Model,f,d,Hm,Hb,Hroof,w,b,Phi)
L0=32.4+20*log(d)/log(10)+20*log(f)/log(10);%自由空間的損耗
if (Phi>=0)&Phi<35
    Lcri=-10+0.354*Phi;
elseif Phi>=35&Phi<55
    Lcri=2.5+0.075*(Phi-35);
elseif Phi>=55&Phi<=90
    Lcri=4.0+0.114*(Phi-55);
end
Lrts=-16.9-10*log(w)/log(10)+10*log(f)/log(10)+20*log(Hb-Hm)/log(10)+Lcri%從屋頂到街道的繞射和散射損耗
if Hb>Hroof
    Lbsh=-18*log(1+Hb-Hroof)/log(10);
    ka=54;
    kd=18;
elseif d>=0.5
    Lbsh=0;
    ka=54-0.8*(Hb-Hroof);
    kd=18-15*(Hb-Hroof)/Hroof;
else
    Lbsh=0;
    ka=54-0.8*(Hb-Hroof)*(d/0.5);
    kd=18-15*(Hb-Hroof)/Hroof;
end
if Model==1
    kf=-4+0.7*(f/925-1);
elseif Model==2
    kf=-4+1.5*(f/925-1);
end
Lmsd=Lbsh+ka+kf*log(f)/log(10)+kd*log(d)/log(10)-9.1*log(b)/log(10);%多屏繞射損耗
if Lrts+Lmsd<=0
    y=L0;
else
y=L0+Lrts+Lmsd;
end
 

 

%%%%%%%%%%%%%%%WI傳播模型%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%發射功率f(MHz),收發天線距離(小區半徑)d(km)%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%視距傳輸%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function y=wireless_Walfish_Ikegami_LOS_attenuation(f,d)
    y=42.6+26*log(d)/log(10)+20*log(f)/log(10);

 

clc;
clear all;
f=900;
d=0.02:0.01:5;
y=wireless_Walfish_Ikegami_LOS_attenuation(900,d);
d1=0.02:0.01:5;
Model=1;
Hm=1.5;
Hb=17;
w=20;
b=40;
Phi=90;
Hroof=15;
f1=900;
f2=1800;
y1=wireless_Walfish_Ikegami_NLOS_attenuation(Model,f1,d1,Hm,Hb,Hroof,w,b,Phi);
y2=wireless_Walfish_Ikegami_NLOS_attenuation(Model,f2,d1,Hm,Hb,Hroof,w,b,Phi);
plot(d,y,'-.c',d1,y1,'--r',d1,y2,'--k');
xlabel('距離(km)')
ylabel('路徑損耗(dB)')
title('COST231-WI模型路徑損耗')
legend('視距路徑損耗f=900MHz','非視距路徑損耗f=900MHz','非視距路徑損耗f=1800MHz')

相關文章