Write the computer program to compute, compare, and plot the following two expre
ID: 2082406 • Letter: W
Question
Write the computer program to compute, compare, and plot the following two expressions for the receiver power, P_ (in Watts, W) versus distance d (in meters, m) for a transmitter-receiver pair in free space (c = 3 times 10^g m/s). Approximate expression: P_ = P_ G_ G_ (h_ h_/d^2)^2 Exact expression: P_ = 4P_ G_ G- (lambda/4 pi t)^2 sin^2 (2 pi h_ h/lambda d) In these expressions, P_t is the transmitter power, G_t is the gain of the transmitter antenna, G_r is the gain of the receiver antenna, h_t is the height of the transmitter antenna, h_r is the height of the receiver antenna, lambda is the wavelength of the signal (speed of EM wave, frequency of the wave, f) Received power at d = l km is l mu W f = 1800 MHz h_t = 40 m h_r = 3 m G_t = 0 dB G_r = 0 dB The distance d is varied from 0.5 km to 20 km in steps of 0.5km. Plots of P_r versus d for each of the expressions given above. Estimate the distance d beyond which the two expressions appear to have almost equal values?Explanation / Answer
clear all;
close all;
clc;
%specifications / program inputs
d = 1000 %1km distance
Pr = 1e-6;%power at 1km distance
f = 1800e+6;%frequency
ht = 40;%height of the transmitter antenna
hr = 3;%height of the reciever antenna
Gt = 1;%gain of the transmitting antenna
Gr = 1;%gain of the receiving antenna
% calculation of Pt for both the formulae
lambda = (3e+8)/f
Pt1 = Pr/(Gt*Gr*((ht*hr/d.^2).^2))
Pt2 = Pr/(4*(Gt*Gr*(lambda/(4*pi*d)).^2)*(sin((2*pi*ht*hr)/(lambda*d))).^2)
%program variable
d1 = 500:500:20000;
%defining outputs
Pr1 = Pt1*(Gt*Gr*((ht*hr./d1.^2).^2));
Pr2 = Pt2*4*Gt*Gr*((lambda./(4*pi.*d1)).^2).*(sin((2*pi*ht*hr)./(lambda.*d1))).^2;
subplot(2,1,1)
plot(d1,10*log(Pr1))
xlabel('distance')
ylabel('Received power for formula 1')
title('Plot for formula 1')
subplot(2,1,2)
plot(d1,10*log(Pr2))
xlabel('distance')
ylabel('Received power for formula 2')
title('Plot for formula 2')
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.