• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

MATLAB程序:广义路径损耗模型

原作者: [db:作者] 来自: [db:来源] 收藏 邀请
function PL=PL_free(fc,dist,Gt,Gr)
% Free Space Path loss Model
% Input
%       fc        : carrier frequency[Hz]
%       dist      : between base station and mobile station[m]
%       Gt        : transmitter gain
%       Gr        : receiver gain
% output
%       PL        : path loss[dB]

%MIMO-OFDM Wireless Communications with MATLAB㈢   Yong Soo Cho, Jaekwon Kim, Won Young Yang and Chung G. Kang
%?2010 John Wiley & Sons (Asia) Pte Ltd

lamda = 3e8/fc;
tmp = lamda./(4*pi*dist);
if nargin>2,  tmp = tmp*sqrt(Gt);  end
if nargin>3,  tmp = tmp*sqrt(Gr);  end
PL = -20*log10(tmp); % Eq.(1.2)/(1.3)
function PL=PL_logdist_or_norm(fc,d,d0,n,sigma)
% Log-distance or Log-normal Shadowing Path Loss model
% Input
%       fc    : carrier frequency[Hz]
%       d     : between base station and mobile station[m]
%       d0    : reference distance[m]
%       n     : path loss exponent, n
%       sigma : variance[dB]
% output
%       PL    : path loss[dB]

%MIMO-OFDM Wireless Communications with MATLAB㈢   Yong Soo Cho, Jaekwon Kim, Won Young Yang and Chung G. Kang
%?2010 John Wiley & Sons (Asia) Pte Ltd

lamda = 3e8/fc;
PL = -20*log10(lamda/(4*pi*d0)) + 10*n*log10(d/d0);  % Eq.(1.4)
if nargin>4,  PL = PL + sigma*randn(size(d));  end  % Eq.(1.5)

 

%plot_PL_general.m

%MIMO-OFDM Wireless Communications with MATLAB㈢   Yong Soo Cho, Jaekwon Kim, Won Young Yang and Chung G. Kang
%?2010 John Wiley & Sons (Asia) Pte Ltd

clear all, clf, clc
fc=1.5e9;  d0=100;  sigma=3;
distance=[1:2:31].^2;
Gt=[1 1 0.5]; Gr=[1 0.5 0.5]; Exp=[2 3 6]; 
for k=1:3
   y_Free(k,:)= PL_free(fc,distance,Gt(k),Gr(k));
   y_logdist(k,:)= PL_logdist_or_norm(fc,distance,d0,Exp(k));
   y_lognorm(k,:)= PL_logdist_or_norm(fc,distance,d0,Exp(1),sigma); % ??
end
subplot(131)
semilogx(distance,y_Free(1,:),'k-o',distance,y_Free(2,:),'b-^',distance,y_Free(3,:),'r-s')
grid on, axis([1 1000 40 110]), title(['Free PL Models, f_c=',num2str(fc/1e6),'MHz'])
xlabel('Distance[m]'), ylabel('Path loss[dB]')
legend('G_t=1, G_r=1','G_t=1, G_r=0.5','G_t=0.5, G_r=0.5',2)
subplot(132)
semilogx(distance,y_logdist(1,:),'k-o',distance,y_logdist(2,:),'b-^',distance,y_logdist(3,:),'r-s')
grid on, axis([1 1000 40 110]),
title(['Log-distance PL model, f_c=',num2str(fc/1e6),'MHz'])
xlabel('Distance[m]'), ylabel('Path loss[dB]'), legend('n=2','n=3','n=6',2)
subplot(133)
semilogx(distance,y_lognorm(1,:),'k-o',distance,y_lognorm(2,:),'b-^',distance,y_lognorm(3,:),'r-s')
grid on, axis([1 1000 40 110]),
title(['Log-normal PL model, f_c=',num2str(fc/1e6),'MHz, ','\sigma=', num2str(sigma), 'dB'])
xlabel('Distance[m]'), ylabel('Path loss[dB]'), legend('path 1','path 2','path 2',2)

 

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
matlab之simulink仿真入门发布时间:2022-07-18
下一篇:
Delphi-利用DLL编程控制摄像头实现拍照、录制视频发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap