This needs to be answered in Python. In communications, one of the most well-kno
ID: 3866228 • Letter: T
Question
This needs to be answered in Python.
In communications, one of the most well-known equations is the Friis transmission formula. It takes characteristics of a transmitting antenna, and a receiving antenna, and calculates what the predicted receive power may be for a given wave being transmitted. It can be defined as: P_R = P_T G_T G_R lambda^2/(4pi r)^2 definitions: P_R - power received at receiving antenna G_R - gain (linear, no units) of receiving antenna P_T - power transmitted (in Watts) of transmitting antenna G_T - gain (linear, no units) of transmitting antenna lambda - wavelength of the wave being transmitted r - distance between the two antennas Cellphones operate in the United States between 800e6 and 1900e6 (MHz). Their wavelength lambda are computed from c/frequency, where c is the speed of light 3e8 m/s. Create a frequency vector in this range with a stepsize of 10e6. Then create a matching wavelength vector. Make a function called frissFormula() that will compute the received power given the input definitions above. You need to calculate the received power across the wavelength vector you computed in step (1). Assume a transmit power of 10 (Watts), a transmit gain of 1.5, and receiver gain of 1. Do this for 3 different distances (r): 5e3, 10e3, 30e3 (km) Make a single figure showing the received power in decibals vs frequency for each distance. You calculate decibal power by 10*np.log10(power). In other words, have one line plot for 5km. one for 10km, and one for 30km. I'd like you to reverse the problem you calculated in steps (1-4). Imagine the transmitter is now a cellphone with a transmit power of 1 (Watt), and the receiver is the tower. Use the same gains as before and calculate the receive power at the tower across the wavelengths for the same three distances. Make a single figure showing all 3 plots like you did for step (4).Explanation / Answer
wavelength=[] #wavelength list declaration
for frequency in range(800*10^6,1900*10^6,10^6): #defining frequency range
wavelength.append(3*10^8/frequency) #calculating wavelengths based upon input
pi=3.14
distance=[5*10^3,10**10^3,30*10^3] #distance vector
def frissFormula(tr_power,tr_gain,receiver_gain):#function definition
receive_power=[] #receiver power declaration
for i in wavelength: #for different wavelengths
for j in distance: # for different distance values
receive_power.append((tr_power*tr_gain*receiver_gain*i*i)/((4*pi*j)*(4*pi*j)));#calculating receiver power
print receive_power
frissFormula(10,1.5,1) #function calling
frissFormula(1,1.5,1)
I don't have numpy or matplot library to plot the graph.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.