# Relation between data rate, frequency(RF) and distance

As I know.the higher frequency can carry higher information.Lets consider we have sub1-GHZ (data transmition) wireless MCU 868 MHz.According to specification it can transmit 100kbps at distance of 700 meter.

If we decrease distance 700 meter to 100 meter , does it carry higher data? I mean 100kbps will be increased at 100 meter and what is the calculation of it.

I will really apreciate if you explain relation between frequency, data rate and distance scientifically with formulas in data transmition.

Thus I will be able to calculate data rate at specific distance.

When you're talking about data rates, distance is irrelevant except in the sense that it will be harder to "close the link" at longer distances. (Closing the link means that the receiver is able to successfully receive the signal transmitted by the transmitter).

A couple key concepts:

Modulation schemes. Modulation is the process of using the properties of a wave (amplitude, frequency, and phase) to encode information. When you use terms like "kbps", you're implicitly talking about encoding digital signals, and there are several ways to do that:

1. Amplitude Shift Keying (ASK): This uses the two different amplitudes to represent 1 and 0. (Wikipedia article: https://en.wikipedia.org/wiki/Amplitude-shift_keying) The simplest ASK method is On-Off Keying (OOK), which uses a zero amplitude for 0, and a fixed (non-zero) amplitude for 1. In other words, you switch the carrier wave on and off: off is a binary 0, and on is a binary 1. The data rate is determined by how quickly you switch between "on" and "off". Frequency is irrelevant; the carrier wave is always at the same, unchanging frequency. [Note: you're not necessarily restricted to two amplitudes. You could, for example, use 4 different amplitudes to encode 2 bits of information: the first amplitude would represent 00, the second represents 01, the third 10, and the fourth 11. However, this is rarely done in practice; whenever ASK is implemented, it is almost always OOK. On the other hand, something like this is commonly done in combination with PSK (described later): the combination is called Quadrature Amplitude Modulation (QAM).] Advantages of ASK are that it's easy (and therefore inexpensive) to implement; disadvantages are that it's susceptible to noise and propagation effects and that you typically can't get very high data rates using it.

2. Frequency Shift Keying (FSK). (Wikipedia article: https://en.wikipedia.org/wiki/Frequency-shift_keying). This uses two frequencies to represent 1 and 0. The carrier wave has a constant amplitude at some frequency $f$, and which is shifted up to $f + \Delta f$ to represent 1 and $f - \Delta f$ to represent 0. The data rate is related to how quickly you can switch between $f + \Delta f$ and $f - \Delta f$. Since you can't switch more quickly than $f$ itself (the frequency of the carrier wave), the maximum theoretical bit rate is equal to the carrier wave frequency, and the bandwidth is $f + 2\Delta f$. If the bit rate is lower, say $r$, then the required bandwidth is $r + 2\Delta f$. Advantages of FSK are that it is better able to deal with noise than ASK (just like FM has better noise rejection than AM), and it is also relatively easy (inexpensive) to implement. Disadvantages are that it's not an efficient use of the bandwidth, and that you tend to emit a lot of power outside of your bandwidth (sidebands) due to the process of switching frequencies. The sidebands can be reduced by carefully choosing how you switch frequencies; these sorts of refinements of FSK include Minimum Shift Keying (MSK) and Gaussian Minimum Shift Keying (GMSK).

3. Phase Shift Keying (PSK) (Wikipedia article: https://en.wikipedia.org/wiki/Phase-shift_keying). This uses the phase of the carrier wave to encode the digital information. The simplest is Binary PSK (BPSK), which uses two phases of a constant-amplitude and frequency sine wave, each 180 degrees apart, to encode 1 and 0. You can also use 4 phases to encode 2 bits of information; this is called Quadrature PSK (QPSK) and is commonly done in practice. Higher order modulations are also possible (8PSK, 16PSK, etc.), and this is also done in practice.

Variations of PSK are more bandwidth efficient than FSK; they are also resistant to noise and you can get higher bit rates using them. However, they are more complex and therefore more expensive. Nevertheless, I'd say they are more commonly used for digital transmissions than ASK or FSK. However, I believe the module you referred to (MCU 868 MHz) only implements ASK and FSK.

Link Closure The ability for a receiver to receive the transmitted signal depends on the power of the transmitted signal, the modulation scheme, and the distance between the transmitter and receiver. A typical measure is the energy used to encode a bit of information (as measured at the receiver) divided by the noise spectral density (also at the receiver): Eb/N0. (Wikipedia article: https://en.wikipedia.org/wiki/Eb/N0). As distance increases, the Eb/N0 will decrease because the power or energy will decrease as $1/r^2$. There's no easy way to talk about bandwidth and distance, except to say that you can change modulation schemes to increase Eb/N0 to offset the loss due to increased distance.

Two factors wholly determine a communication link's information transmission rate (measured in in bits per second, or in general, entropy units per unit time):

1. Signal to noise ratio; and
2. Symbol transmission rate (roughly equivalent to bandwidth).

The first is precisely quantified by Shannon's Noisy Channel Coding Theorem, which I discuss in more detail in my answer here: this tells you how many bits per transmitted symbol you can possibly send. Shannon's theorem is very beautiful insofar that it proves that, as long as this number of bits does not exceed a quantity called the Channel Capacity per symbol, then there must exist a coding scheme that will send those bits for you with arbitrarily small probability of error. That is, if you're willing to make your coding scheme complicated enough by grouping symbols into ever larger words and introducing correlation between them, then you can come as near as you like to perfect communication even in the face of noise (this is what error correcting codes do) And the theorem does this wholly geometrically, without actually having to consider the actual coding scheme used! The theorem also tells you that this bound is precise and tight - if you try to send any arbitrarily small amount of information per symbol greater than the channel capacity, then errors are certain over a big enough word length.

If the noise is Gaussian and linearly additive to the channel, Shannon's theorem becomes the special case of the Shannon-Hartley theorem:

$$C = \frac{1}{2}\log_2(1 + \mathrm{SNR})$$

and this tells you how many bits you can possibly send per symbol (here SNR is a ratio, not expressed in decibels).

The bandwidth then tells you how fast you can send symbols. This is quantified by the Nyquist-Shannon sampling theorem, that one can theoretically send symbols at a rate of $B/2$ symbols per second through a channel of bandwidth $B$.

So: the transmission distance only enters the calculation indirectly: all our practical know mediums degrade signal to noise with distance: radio inflicts the $1/r^2$ intensity loss law on us and optical fibers slowly absorb the light as it propagates along them. You need to work out what a given link's signal to noise ratio will be at the output.

I give a fuller investigation of how the Shannon noisy coding theorem and Shannon-Nyquist theorem can be used to give an estimate for the maximum possible throughput of an optical fiber link in my answer here.