# What are the units used in Shannon formula calculation?

I'm a CompSci student with absolutely no background in wireless communication who recently needs to do something with the Shannon formula: $$R = W log_2\bigg(1+\frac{P_t H^2}{N_0 W}\bigg)$$ I need to calculate the achievable data rate $$\R\$$ given:

• Bandwidth $$\W=2\$$ MHz.
• Transmit power $$\P_t=0.2\$$ Watt.
• Path loss model: $$\128.1 + 37.6log_{10}(d)\$$, where d = 0.45 km.
• Noise power density $$\N_0 = -174\$$ dBm/Hz.

This is how I'm calculating $$\R\$$:

• Convert bandwidth $$\W\$$ to Hz, so now $$\W=2\times10^6\$$ Hz.
• Leave the transmit power as is (Watt).
• Given the path loss model, we have $$\H=10^{-12.81}(450)^{-3.76}\approx 1.64\times10^{-23}\$$.
• Convert noise power density $$\N_0\$$ to W/Hz, so now $$\N_0=10^{\frac{-174-30}{10}}=10^{-20.4}\$$ W/Hz.
• Finally, the data rate $$R = 2\times10^6\times log_2\bigg(1 + \frac{0.2\times(1.64\times10^{-23})^2}{10^{-20.4}\times 2\times10^6}\bigg) \approx 0 \text{ bps (?!?)}$$

The resulted data rate is extremely small - close to zero. I reckon because the channel gain is too small? Could someone please tell me what went wrong in my calculation above? I'm quite confused with all the different units of measurement in wireless communication.

I already went over this relevant question (Calculating Data Rate using Bandwidth, Transmission Power, Noise Power Spectrum Density and Channel Gain) but still couldn't figure out.

UPDATE 1:

I just found out that the path loss model: $$\128.1 \text{dB} + 37.6log_{10}(d)\$$ is equivalent to $$\ \frac{P_r}{P_t}=\frac{10^{-12.81}}{d^{3.76}} \$$. So that we can find the actual received power $$\P_r\$$ (transmit power minus the power lost by distance during the transmission). I guess the numerator in the formula ($$\P_t H^2\$$) should be replaced by this $$\P_r\$$. The data rate now is: $$R = 2\times10^6\times log_2\bigg(1 + \frac{0.2\times \frac{10^{-12.81}}{d^{3.76}}}{10^{-20.4}\times 2\times10^6}\bigg)\approx 0.5 \text{ Mbps}$$ I'm not sure whether distance $$\d\$$ should be meter or kilometer. If meter, the data rate is 70.2Mbps, which is crazily high. If kilometer, we have spectral efficiency (the log part of the formula) $$\=0.25\$$ bps/Hz, and data rate $$\R=0.5\$$ Mbps, which makes more sense. Am I doing this right? Is this number realistic given all the settings above?

~~

Alternatively, I've seen the channel gain being calculated like this $$\H=d^{-\alpha}\$$, where distance $$\d\$$ is in meter, and path loss exponent is, say, 3.76. If I apply this to the original formula above. The data rate is now: $$R = 2\times10^6\times log_2\bigg(1 + \frac{0.2\times (450^{-3.76})^2}{10^{-20.4}\times 2\times10^6}\bigg) \approx 0.8 \text{ bps} \approx 8.1\times 10^{-7} \text{ Mbps}$$ which seems quite small compared to what I got above (0.5 Mbps). I know the setting here (channel gain calculation) is different but I wasn't expecting such a large difference.

Is there anything wrong? Which calculation is more realistic in practice?

For those interested, I found these lecture notes quite useful. They contain some example calculations.

http://weber.itn.liu.se/~vanan11/TNK080/Lecture1.pdf

http://weber.itn.liu.se/~vanan11/TNK080/Lecture2.pdf

• Have you checked the units? Like dimensional analysis; put all the units in and see if you are left with what you expect. Jun 14, 2020 at 14:16
• Dimensional analysis that involves logarithm doesn't seem straight-forward but let me try it out. Thanks for the suggestion.
– foo
Jun 14, 2020 at 14:34
• Could you be more precise about the "path loss model"'s units and meaning? The rest looks plausible. (And as to logarithms: if you don't have an error, you should always find that you're taking the logarithm of a dimensionless quantity. Just remember that units like "dBm" imply a division by the reference quantity such as 1 mW for dBm.) Jun 14, 2020 at 15:01
• Excuse me, but I'm sure many of us wouldn't insert exponent 2 to the path loss parameter H. It does not affect units, but looks an error. Can you check is it valid in your case and fix the formula if needed. If you want to keep it as H^2 then please show your formula for H. It's something else than the usual Friis rule.
– user136077
Jun 14, 2020 at 15:16
• @foo what are the units of logs? m/s?m/s^2? or are they dimensionless? Jun 14, 2020 at 15:17

Your formula for data rate combines Shannon's equation and signal propagation loss into one row. Shannon's equation for an analog communication channel subject to additive white Gaussian noise (AWGN) of power N:

R = W∙log2(1+S/N)

Assuming your receiver amplifier's noise is negligible and the signal bandwidth is W, we can aspire to reach data rate as high as

R = W∙log2(1+P_R/(N_0∙W))

where P_R is a signal power at the receiver, N_0 is a noise power density.

With the freespace propagation loss model, the signal power at the receiver can be expressed as

P_R = P_T∙G_T∙G_R∙(lambda/(4πd))^2

where P_T is a full transmitted power, G_T and G_R are "directional gains" of transmitting and receiving antennas respectively, lambda is a wavelength, d is a distance between transmitting and receiving antennas.

Expressing wavelength lambda via frequency f in megahertz units (lambda = c/f, c = 299792km/sec), we arrive at the formula (d in kilometers)

P_R/P_T = G_T∙G_R∙0.57∙10^(-3)/(d∙f)^2

In engineering calculations, the ratio P_R/P_N is expressed in decibels:

(P_R/P_T)(dB) = (G_T)(dB) + (G_R)(dB) - (32.44 + 20∙lg(d) + 20∙lg(f))(dB) (lg is decimal logarithm)

The quantity 32.44 + 20∙lg(d) + 20∙lg(f) is termed "path loss in empty space", the losses, calculated under assumption that there are no signal reflection and no absorption of radiation in the medium.

You never mentioned the derivation of an H_0 quantity in your formulas, so I carry out the numerical calculation for half-wave dipole antennas at both transmitter and receiver ends. Therefore, the directional gains are

G_T = G_R ≈ 2.15 dB

Also, you do not specify the radio frequency f. I assume f = 2400 MHz.

With your data d = 0.45km and my assumed radio frequency f = 2400MHz,

(P_R/P_T)(dB) = 2∙2.15 - 32.44 - 20∙lg(0.45) - 20∙lg(2400) = -88.8

With your data P_T = 0.2W, N_0 = -174dBm/Hz = 10^(-20.4)W/Hz,

R = 2∙10^6∙log2(1+0.2∙10^(-8.88)/(10^(-20.4)∙2∙10^6)) ≈ 30 Mbps

With your data and under assumptions I specified above, we can achieve a data rate of approx. 30Mbps. That good value for a 2MHz bandwith is not unbelievable, because noise figure is quite low. Indeed, -174dBm/Hz is the thermal noise at 290K and therefore the low limit for conventional designs.

• @user287001 'Common types of low-gain omnidirectional antennas are the whip antenna, "Rubber Ducky" antenna, ground plane antenna, vertically oriented dipole antenna ...', see en.wikipedia.org/wiki/Omnidirectional_antenna Jun 15, 2020 at 9:22

Shannon formula: $$C = W log_2\bigg(1+\frac{P}{N_0 W}\bigg)$$

P is the signal power, NoW is the power of the assumed white noise, W is the channel bandwidth and the result C is the theoretical ultimate limit information rate as bits/second which can be got with as low error rate as wanted by using more complex coding. The formula is existence theorem which gives no hint what coding will give a certain wanted error rate. It also doesn't deny faster communication if some error rate >0 is accepted.

If you insert to P the received power and assume there's no other noise than the white noise power NoW in receiver's input you will get the theoretical maximum error free communication bitrate. It can be much higher than what's achievable with a practical system which doesn't use a complex coding and operates in an environment where usual NoW gives far too low noise or the noise is statistically something else than stationary non-self-correlating normal distribution white noise purely added (not multiplied) to the signal.

P and NoW must be calculated in the same units, say in watts and W must be in hertzes. Then C is bits/second or actually 1/second. It tells how many per second. We have a habit to say bits per second. Saying bits is the same common habit as using angle measurement unit radian which is actually a dimensionless number.

We have no idea of your path attenuation calculations. Numbers tell nothing of their meanings. H^2 vaguely hints you have taken a part of complex "optimal power distribution multichannel system" capacity formula. H^2 is a plain number there. Augment your question to show the primary variables of the received power calculation if you expect something to be said about it.