sdr.free_space_path_loss(distance: ArrayLike, freq: ArrayLike) NDArray[float64]

Calculates the free-space path loss (FSPL) in dB.

\[\text{FSPL} = 10 \log_{10} \left( \frac{4 \pi d f}{c} \right)^2\]

Parameters:
distance: ArrayLike

The distance \(d\) in meters between the transmitter and receiver.

freq: ArrayLike

The frequency \(f\) in Hz of the signal.

Returns:

The free-space path loss (FSPL) in dB.

Note

The free-space path loss equation is only valid in the far field. For \(d < \lambda / 4 \pi\), the FSPL equation has a negative result, implying a path gain. This is not possible. So these path losses are set to 0 dB.

Examples

Compute the free-space path loss for a 1 km link at 1 GHz.

In [1]: sdr.free_space_path_loss(1e3, 1e9)
Out[1]: 92.44778322188337

The free-space path loss is proportional to the square of the distance. So, doubling the distance results in a 6 dB increase in the free-space path loss.

In [2]: sdr.free_space_path_loss(2e3, 1e9)
Out[2]: 98.468383135163

The free-space path loss is also proportional to the square of the frequency. So, doubling the frequency results in a 6 dB increase in the free-space path loss.

In [3]: sdr.free_space_path_loss(1e3, 2e9)
Out[3]: 98.468383135163

Plot the free-space path loss at 1 GHz for distances up to 1 km.

In [4]: d = np.linspace(0, 1_000, 1000)  # m

In [5]: fspl = sdr.free_space_path_loss(d, 1e9)  # dB

In [6]: plt.figure(); \
   ...: plt.plot(d, fspl); \
   ...: plt.xlabel('Distance (m)'); \
   ...: plt.ylabel('Free-space path loss (dB)');
   ...: 
../../_images/sdr_fspl_1.png

It is confusing why free-space path loss is proportional to the square of frequency. Is RF energy attenuated more at higher frequencies? The answer is no. The reason the FSPL equation has a frequency dependence is that it assumes omnidirectional, isotropic antennas are used at both the transmitter and receiver. The isotropic antenna has a gain of 0 dBi. The physical size of a roughly isotropic antenna (think dipole) is a function of frequency as well. So, as the frequency increases, the physical size of the isotropic antenna decreases. But what if the size of the antenna was fixed across frequency, as is the case with a parabolic dish antenna? You’ll note that the gain of a parabolic dish antenna is also proportional to the square of the frequency, see sdr.parabolic_antenna().

It turns out that if omnidirectional antennas are used at both the transmitter and receiver, the total path loss increases with frequency. But if a parabolic reflector is used at one end, the total path loss is constant across frequency. Furthermore, if a parabolic reflector is used at both ends, as is the case in VSAT systems, the total path loss decreases with frequency.

In [7]: freq = np.linspace(1e6, 40e9, 1_001)

# Free-space path loss at 1 km
In [8]: fspl = sdr.free_space_path_loss(1e3, freq)

# Isotropic antenna gain in dBi
In [9]: iso = 0

# 1-meter diameter parabolic dish antenna gain in dBi
In [10]: par = sdr.parabolic_antenna(freq, 1)[0]

In [11]: plt.figure(); \
   ....: plt.plot(freq / 1e9, fspl - iso - iso, label="Isotropic -> Isotropic"); \
   ....: plt.plot(freq / 1e9, fspl - iso - par, label="Isotropic -> Parabolic"); \
   ....: plt.plot(freq / 1e9, fspl - par - par, label="Parabolic -> Parabolic"); \
   ....: plt.legend(title="Antennas", loc="center right"); \
   ....: plt.xlabel("Frequency (GHz), $f$"); \
   ....: plt.ylabel("Path loss (dB)"); \
   ....: plt.title("Path loss across center frequency");
   ....: 
../../_images/sdr_fspl_2.png