⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pathloss.m

📁 Electronic Communication Systems的Matlab源码
💻 M
字号:
%
% Received power as a percentage of the transmitted power, taking into acount
% free-space loss, receiver input impedance mismatch and a
% transmitter receiver spacing of 20km to 100km
% 
%

%

tx_freq=input('Enter the Transmitter carrier frequency in Megahertz  ');
tx_len=input('Enter the transmission line length in metres  ');
tx_loss=input('Enter the transmission line loss in dB per metre  ');
tx_gain=input('Enter the transmitter antenna gain in dB  ');
rx_gain=input('Enter the receiver antenna gain in dB  ');
rx_char_imp=input('Enter the receiver input line characteristic impedance in ohms  ');
rx_input_imp=input('Enter the receiver input impedance in ohms  ');


%
% vector of distances from 20km to 100km
%
d=20:0.1:100;
%
% Free-space loss computation
% 
%
Lfs=32.44+20*log10(d)+20*log10(f)-tx_gain-rx_gain;
%
% Transmitter line loss
%
Ltx=tx_len*tx_loss;

tau = (rx_input_imp-rx_char_imp)/(rx_input_imp+rx_char_imp);

%
% Loss at receiver
%
Lrx = -10*log10(1-tau.^2);

% Overall loss
Lt= Lfs + Ltx + Lrx;

%
% received power as a percentage of transmitted power
%
efficiency=100*10.^(-1*Lt/10);

%
% Plot efficiency versus distance
%
clf
figure(1)

plot(d,efficiency);
title('Percentage Efficiency for various transmitter receiver spacing')
ylabel('Percentage')
xlabel('transmitter receiver spacing in km')
grid
%

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -