I am using a Hack RF One as SDR and the software GNU Radio to receive and process signals emitted from a drone. Given that the drone is moving and is emitting signals from a wide zone, received signal strengths vary dramatically : if the signal is too large, it over-ranges the ADC input and if the signal is too small, it gets lost in the converter's quantization noise.

At the reception, I have three different gains : RF gain, IF gain and BB gain. RF gain can be set to 0 or 14dB, IF gain from 0 to 40dB by 8dB steps and BB gain from 0 to 62dB by 2dB steps. At the transmission, I keep the transmitting power constant.

For now, my algorithm to manage the different values of gains is the following : Every x seconds, I look at the received digitised signal peak-to-peak value $V_{pp}$ (I take the maximum value V_pp for real or imaginary received signal) and I try to maintain this value into a range such that $V_{pp,lim1} < V_{pp} < V_{pp,lim2}$ , to avoid quantization noise and saturation. To do so, I simply increase or decrease the gain in function of the value $V_{pp}$, starting with IF and BB gains to finish with the amplifying RF gain.

The problem is the following : My algorithm is not optimised. Given that the possible changing steps are not linear and different for every type of gain (14dB for RF, 8dB for IF and 2dB for BB), I sometimes fall into situations where my gains are continuously changing between two situations and do not manage to stabilise even if I keep the distance constant between emitter and receiver.

The question is : how can I manage to have the more constant output amplitude so that my dynamic range is optimised for the ADC?

Constraints :

  • Gain steps restricted : 14dB for RF (0 or 14dB), 8dB for IF (from 0 to 40dB) and 2dB for BB (from 0 to 62dB)

  • Order of changing gains : "Increase or decrease the IF and baseband gain controls roughly equally to find the best settings for your situation. Turn on the RF amp if you need help picking up weak signals" (source : https://github.com/mossmann/hackrf/wiki/FAQ )

  • $\begingroup$ Generally, things like this greatly depend on the modulation you use. What's your modulation scheme, and what's your bandwidth? $\endgroup$ – Marcus Müller Aug 10 at 18:55
  • $\begingroup$ oh, and very relevant: how large is the change between your signal powers from close to far? $\endgroup$ – Marcus Müller Aug 10 at 20:23
  • $\begingroup$ I'm using QPSK modulation and my sampling rate is 2MHz $\endgroup$ – Dylan Aug 11 at 10:43
  • $\begingroup$ You mean for same transmitting and receiving powers, how the amplitude of my signal is reduced in function of the min and max distance? $\endgroup$ – Dylan Aug 11 at 10:45
  • $\begingroup$ and fading, yes :) I simply would like to know the dynamic range you need to cover. $\endgroup$ – Marcus Müller Aug 11 at 10:50

To avoid quantization or limit cycle oscillations, you can add hysteresis to your AGC decision loop (a form of "debouncing").

  • $\begingroup$ How would you implement the add of a hysteresis to my algorithm? Hysteresis is useful to be conscious of the "direction" of the algorithm but I do not see the utility here. $\endgroup$ – Dylan Aug 12 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.