城市地区的路径损耗模型(Matlab代码实现)

 👨‍🎓个人主页:研学社的博客  

💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

1.1 视距(LOS)环境下的自由空间路径损失:

1.2 Okumura Model

1.3 Hata Model

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码及讲解


💥1 概述

来源:

 采用分析方法和经验方法相结合的方法推导了传播模型。

利用传播模型计算了无线网络初始部署时的电磁干扰,并对无线网络初始部署时的规划进行了分析。它描述了从发射机到接收机天线的信号衰减是距离、载波频率、天线高度和其他重要参数如地形剖面(如城市、郊区和农村)的函数。

利用弗里斯自由空间模型等模型,对收发端有视距条件下的接收端信号功率进行预测。经典的Okumura模型用于城市,郊区和农村地区。

1.1 视距(LOS)环境下的自由空间路径损失:

1.2 Okumura Model

1.3 Hata Model

📚2 运行结果

部分代码:

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes URBANPATHLOSSMODELS wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = URBANPATHLOSSMODELS_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

function edit1_Callback(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit1 as text
%        str2double(get(hObject,'String')) returns contents of edit1 as a double


% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end

function edit2_Callback(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit2 as text
%        str2double(get(hObject,'String')) returns contents of edit2 as a double


% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end

function edit3_Callback(hObject, eventdata, handles)
% hObject    handle to edit3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit3 as text
%        str2double(get(hObject,'String')) returns contents of edit3 as a double


% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end

function edit4_Callback(hObject, eventdata, handles)
% hObject    handle to edit4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit4 as text
%        str2double(get(hObject,'String')) returns contents of edit4 as a double


% --- Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
%% Free Space Model Simulation
% clear figure;
Dist=get(handles.edit1,'string');% Get Distance in Km
Dist= str2num(Dist);
Dist_m=Dist*1000;              % Convert it into meters
Dist_Log_Km= log10(Dist);       % Distance in Log Scale (for Km)
Dist_Log_Meter=log10(Dist_m);   % Distance in Log Scale (FOr meters)
% disp(Dist)
% disp(Dist_m)
% disp(Dist_Log_Km)
% disp(Dist_Log_Meter)
c=3*1e8;   
Freq=get(handles.edit2,'string'); % Get Carrier Frequency in MHz
Freq= str2num(Freq);
% disp(Freq)
lamda=c/(Freq*1e6);             % Calculate Wavelength
% disp(lamda)
TX_Ht=get(handles.edit3,'string'); % Get Carrier Frequency in MHz
TX_Ht= str2num(TX_Ht);
% disp(TX_Ht)
RX_Ht=get(handles.edit4,'string'); % Get Carrier Frequency in MHz
RX_Ht= str2num(RX_Ht);
% disp(RX_Ht)
% The Path Loss for the free space when the antennas are unity gain is given by,

FreeSpace=10*log10((Dist_m*pi*4).^2/lamda^2); 

% disp(FreeSpace)
axes(handles.axes1);
handles.axes1=min(Dist_Log_Km):max(Dist_Log_Km);
plot(Dist_Log_Km,FreeSpace,'g-*');
% Equation (4.6) From "Wireless COmmunication, Principles and Practice" By Theodore Rappaport 

title('Pathloss prediction by Free space model for Urban Area');
xlabel('Distance log10(d)');
ylabel('Path loss (dB)');
legend('Free Space Loss');
% hold on
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
%% Okumura Model
% clear figure;
Dist=get(handles.edit1,'string');% Get Distance in Km
Dist= str2num(Dist);
Dist_m=Dist*1000;              % Convert it into meters
Dist_Log_Km= log10(Dist);       % Distance in Log Scale (for Km)
Dist_Log_Meter=log10(Dist_m);   % Distance in Log Scale (FOr meters)
% disp(Dist)
% disp(Dist_m)
% disp(Dist_Log_Km)
% disp(Dist_Log_Meter)
c=3*1e8;   
Freq=get(handles.edit2,'string'); % Get Carrier Frequency in MHz
Freq= str2num(Freq);
% disp(Freq)
lamda=c/(Freq*1e6);             % Calculate Wavelength
% disp(lamda)
TX_Ht=get(handles.edit3,'string'); % Get Carrier Frequency in MHz
TX_Ht= str2num(TX_Ht);
% disp(TX_Ht)
RX_Ht=get(handles.edit4,'string'); % Get Carrier Frequency in MHz
RX_Ht= str2num(RX_Ht);

OKU_LOSS=20*log10(lamda^2/(4*pi)^2*Dist_m)+5-20*log10(TX_Ht/200)-10*log10(RX_Ht/3)-9;
% Okumura Loss Model Equation
axes(handles.axes1);
handles.axes1=min(Dist_Log_Km):max(Dist_Log_Km);
plot(Dist_Log_Km,OKU_LOSS,'-*');
% Equation (4.6) From "Wireless COmmunication, Principles and Practice" By Theodore Rappaport 

title('Pathloss prediction by Okumura model for Urban Area');
xlabel('Distance log10(d)');
ylabel('Path loss (dB)');
legend('Okumura Model');
% hold on
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
%% HATA's model:
Dist=get(handles.edit1,'string');% Get Distance in Km
Dist= str2num(Dist);
Dist_m=Dist*1000;              % Convert it into meters
Dist_Log_Km= log10(Dist);       % Distance in Log Scale (for Km)
Dist_Log_Meter=log10(Dist_m);   % Distance in Log Scale (FOr meters)
% disp(Dist)
% disp(Dist_m)
% disp(Dist_Log_Km)
% disp(Dist_Log_Meter)
c=3*1e8;   
Freq=get(handles.edit2,'string'); % Get Carrier Frequency in MHz
Freq= str2num(Freq);
% disp(Freq)
lamda=c/(Freq*1e6);             % Calculate Wavelength
% disp(lamda)
TX_Ht=get(handles.edit3,'string'); % Get Carrier Frequency in MHz
TX_Ht= str2num(TX_Ht);
% disp(TX_Ht)
RX_Ht=get(handles.edit4,'string'); % Get Carrier Frequency in MHz
RX_Ht= str2num(RX_Ht);
 

🎉3 参考文献

部分理论来源于网络,如有侵权请联系删除。

🌈4 Matlab代码及讲解

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

荔枝科研社

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值