4
$\begingroup$

I just started using a couple of low power radio modules in my project (HopeRF RFM69HCW). I made them work; they successfully transmit messages in a limited range (5-10 meters). Now I would like to improve that range (with a minimal message loss).

My problem is choosing the Bit rate, the frequency deviation, and the Rx Bandwidth for the channel filter (the settings I'm currently using are quite random: Br=19600, Fdev=2*Br, RxBw=Br). So I went on the web looking for a good-looking function describing the relationship between these three parameters and the transmission range, looking forward to writing a function like setBitRate(unsigned int x) {Br = x; Fdev = func1(x); RxBw = func2(x);}.

Instead of that, documents explaining the meaning of those parameters aside (very interesting but often too complex for me, specially those concerning the channel filter), I found some (not many) configuration tables, like this one in the source of the RadioHead RFM69 library (I'll only reproduce a fragment of it here; in this case RxBw is set implicitly and therefore not showed in this list):

FSK_Rb2Fd5 = 0,    ///< FSK, Whitening, Rb = 2kbs,    Fd = 5kHz
FSK_Rb2_4Fd4_8,    ///< FSK, Whitening, Rb = 2.4kbs,  Fd = 4.8kHz 
FSK_Rb4_8Fd9_6,    ///< FSK, Whitening, Rb = 4.8kbs,  Fd = 9.6kHz 
FSK_Rb9_6Fd19_2,   ///< FSK, Whitening, Rb = 9.6kbs,  Fd = 19.2kHz
FSK_Rb19_2Fd38_4,  ///< FSK, Whitening, Rb = 19.2kbs, Fd = 38.4kHz
FSK_Rb38_4Fd76_8,  ///< FSK, Whitening, Rb = 38.4kbs, Fd = 76.8kHz
FSK_Rb57_6Fd120,   ///< FSK, Whitening, Rb = 57.6kbs, Fd = 120kHz
FSK_Rb125Fd125,    ///< FSK, Whitening, Rb = 125kbs,  Fd = 125kHz
FSK_Rb250Fd250,    ///< FSK, Whitening, Rb = 250kbs,  Fd = 250kHz
FSK_Rb55555Fd50,   ///< FSK, Whitening, Rb = 55555kbs,Fd = 50kHz for RFM69 lib compatibility

I did try to understand it's logic, but I couldn't. For instance, why does this list suddenly change from Fd = 2*Rb (until line 7) to Fd = Rb (from line 8)?

I found different lists, whit different parameters, but I never found a logic behind them. Does a (even complex) function which relates bit rate, frequency deviation and channel filter bandwidth exist? Or where all these settings likely found experimentally? Am I trying to relate unrelated settings (I admit that I have a poor understanding of them, especially of the third), or am I forgetting some strongly related ones?

$\endgroup$
2
  • $\begingroup$ Looks like the datasheet gives the formulas you seek. $\endgroup$ Feb 21, 2018 at 16:30
  • $\begingroup$ @Phil Frost Where are that formulas? Reading the datasheet I only found formulas some wide constraints that appy to fsk modulation, e.g. 600Hz < Fdev and Fdev + BitRate/2 <= 500kHz, which means almost nothing at low bit rates (e.G. for 9600 bit/s Fdev can be in a 600Hz - 495200Hz range) $\endgroup$ Feb 21, 2018 at 18:13

3 Answers 3

2
$\begingroup$

There are two primary theorems that come into play to address your question - the Nyquist theorem and the Shannon-Hartley theorem.

Nyquist

The Nyquist theorem defines the maximum channel capacity for a noiseless channel. His formula to express this is:

$$C=2B\log_2{M} \tag 1$$

where C is the channel capacity in bits per seconds, B is the maximum bandwidth of the channel in Hertz and M is the number of signaling values (2 for binary, 4 for QPSK, etc.)

This formula suggests that we could simply keep increasing the number of signal values and the channel capacity would increase ad infinitum. But no real world channel is noiseless so ultimately noise becomes the limiting factor. This is where the Shannon-Hartley equation becomes important.

Shannon-Hartley

The Shannon-Hartley theorem describes the maximum channel capacity based on the signal to noise ratio of the channel:

$$C=B\log_2{(1+S/N)} \tag 2$$

where C is the maximum channel capacity in bits per second, S is the signal power, N is the noise power, and B is the channel bandwidth in Hertz.

We can see that the Shannon theorem therefore places an "upper bound" on maximum channel capacity based on the signal to noise ratio of the system and the bandwidth of the channel. For example, with a 30 dB signal to noise ratio (a linear power ratio of 1000) and a 3 kHz bandwidth, the maximum channel capacity is ~30,000 bits per second. If we can improve the signal to noise ratio to 40 dB (a linear power ratio of 10000), the maximum channel capacity rises to ~40,000 bits per second.

Application in RF Systems

As the distance between the transmitter and receiver is doubled, the received signal strength is quartered while the noise power remains the same (provided there are no noise sources that come into closer proximity as a result). Thus the signal to noise ratio has been quartered. We can therefore apply the Shannon theorem to determine the effect of doubling the distance between the transmitter and receiver:

$$C_\Delta=\frac{B\log_2{(1+(S/N)*0.25)}}{B\log_2{(1+S/N)}}=\frac{\log_2(1.25)}{\log_2(2)}=0.322 \tag 3$$

So we can see that with each doubling of distance between the antennas, the maximum channel capacity is reduced by approximately 68%.

We can overcome this loss in maximum channel capacity by increasing the gain of the transmit or receive antennas or increasing the power of the transmitter. But it is clear that if no other steps are taken, doubling the distance means we must reduce the bit rate by about 68% to maintain communications.

$\endgroup$
2
  • $\begingroup$ Thank you very much especially for the formulae 2 and 3, which I didn't know yet. But I still don't know how to set bit rate and frequency deviation... I have too little knowledge in RF systems to deduce practical settings $\endgroup$ Feb 28, 2018 at 9:31
  • $\begingroup$ @noearchimede I suggest you contact an applications engineer at HopeRF for a configuration guideline specific to your module since these settings can be dependent on the architecture of the chip. They typically have such supporting documentation available on request. $\endgroup$
    – Glenn W9IQ
    Feb 28, 2018 at 12:09
0
$\begingroup$

if you still need the answer, set rxbw = fdev, and rxbw >= 0.5 bitrate the bigger rxbw & fdev, the better is quality of reception in case of no other sources present. if another radios are transmitting, the lower rxbw, the less interferention. so you can only determine optimal rxbw and bitrate in your custom conditions experimentally.

i'd suggest to set minimal bitrate that suits your needs and rxbw = 0.5 bitrate, in case this doesn't work well, try rxbw = bitrate. if this doesn't work, try various values for rxbw from 0.5bitrate to 2bitrate to find best tradeoff between quality and interferention

$\endgroup$
0
$\begingroup$

There's a lot of "it depends" involved. The best relationship between bitrate and deviation depends on the noise floor and the frequency stability of the radios. A lower deviation allows a narrower receive filter, and a narrower receive filter means that less noise gets in with your signal, which in theory improves signal-to-noise ratio and therefore range. But that only works if the transmitter and the receiver are accurately on the same frequency, and these cheap radio modules, operating at UHF frequencies, usually are not accurate.

If one or both of the units is drifting in frequency, then that change in frequency makes it harder to distinguish the actual frequency-shift signal. If they're far enough off from one another, then the desired signal can fall outside of the receive filter passband and be attenuated. The first thing is mitigated by increasing the deviation (and increasing the Rx BW to match), the second thing is mitigated by increasing the Rx BW even more so that the signal will still fall inside of it. But those mitigations raise the effective noise floor, which is bad, so there ends up being a sweet spot.

If the ambient noise is high or your radios have TCXOs then that drives the sweet spot towards the narrower bandwidths for a lower bitrate; if the ambient noise is low, or your radios are particularly drifty, then you probably need wider bandwidths. The lowest bitrates are usually most likely to work, but sometimes there are low-bitrate options on the list that are simply too narrow for your unit to have any hope of pulling off.

The best thing to do is a lot of testing. If you don't have time for that, or if you need some starting points for testing, look for experience reports from people who have used the same hardware successfully — there are lots of them on the internet.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .