Skip to content

Automatic Gain Control (AGC)

DD4WH edited this page Dec 20, 2017 · 32 revisions

UHSDR AGC settings explained

Text and figures © DD4WH, under GNU GPLv3

WDSP AGC

We use this AGC by Warren Pratt which is part of the WDSP library. It was implemented for the UHSDR because it has some more features that might potentially be useful in very specific RX situations.

QUICK USER GUIDE FOR THE AGC:

  1. search for a free frequency --> band noise
  2. use encoder 2 to adjust the AGC threshold ("AGC"), so that the white text "AGC" in the blue AGC indicator box starts to disappear
  3. With button M2 toggle focus of encoder 2 to next box
  4. Adjust AGC mode according to your personal preference and your band situation: OFF = AGC off

FAS = fast

MED = medium

SLO = slow

LON = long

vLO = very long

the figure is the time constant = AGC WDSP DECAY for the AGC (given in centiseconds = milliseconds*10, that decay time is the time the AGC needs to increase up to maximum sensitivity again: thus 100 means 1 second). This is predefined for the different AGC modes, but can be fine-tuned in the menu --> AGC WDSP DECAY

  1. Ready!

The AGC can be very easily and quickly adjusted for any specific receive and noise situation. The WDSP AGC has double AGC detectors (one with short and one with long time constant, thus potentially better for a suppression of short noise impulses) and a hang AGC with adjustable hang time.

AGC explained Figure 1: Relationship between input and output signal level WITH (A-->D-->F) and WITHOUT (A-->B-->C) an automatic gain control (AGC) with an indication of some of the WDSP AGC parameters that can be controlled by the user. Inspired by a paper by Phil Harman: “A discussion on the AGC requirements of the SDR1000” (I added the relevant AGC parameters for better understanding).

If you want to know mmore about how your AGC works, please read this paper and use figure 1 above to understand how the AGC works: Phil Harman (VK6APH): A discussion on the Automatic Gain Control (AGC) requirements of the SDR1000. - http://www.flexradio.com/downloads/vk6aph-agc-discussion-powersdr-pdf/

This paper is excellent, fun to read, instructive and essential for the full understanding of the functioning and the perfect adjustment for the WDSP AGC.

Because Phil has explained the AGC so well in his paper, I will now restrict myself to the explanation of the menu adjustments of the parameters implemented in the mcHF firmware and assume that the reader is well informed about how these parameters affect the AGC functioning.

AGC WDSP switch

choose between “Standard AGC” and “WDSP AGC”: please note that the S-Meter in old school style does not work when switched to “WDSP AGC”: the S-Meter is automatically switched to be based on dBm instead.

AGC WDSP Mode

choose between predefined parameter sets for the AGC. AGC DECAY is the time needed until the AGC recovers from a strong signal to achieve higher gain for a low signal.

AGC modes and settings

AGC threshold

this is the most important WDSP AGC parameter. It determines the input signal level where the AGC knee is situated (see figure 1). AGC action only takes place for input signal levels exceeding this level. It is given as a gain figure in dB. If this threshold is too low, AGC action takes place with band noise leading to an amplification of band noise --> annoying hiss for RX. If it is set too high, AGC action starts only with very large signals and this can potentially lead to distortion in the ADC with large signals. There is an AGC indicator, a blue box right of the load indicator. If it says "AGC" the input signal level has exceeded the AGC threshold, which means AGC action is taking place. So it is very easy to adjust the AGC threshold:

  • Set AGC WDSP to FAST (for faster reaction of the AGC indicator box)

  • Set mcHF to a frequency without a signal (only band noise)

  • Adjust AGC threshold to the point where the blue AGC box display changes between ON/OFF or a little bit lower

  • Set AGC WDSP to FAST/MED/SLOW/LONG/very LONG again after your preference

AGC WDSP Slope

Indicates the output signal level difference between very low input signals and very high input signals. If set to 0dB, every signal has the same volume and the RX sounds flat. A good sounding effect can be adjusted with settings between 3 and 10dB, but that is very dependent on the hearing habits and the personal preference of the user. Experiment with this, until you achieve a pleasant and non-tiring result.

AGC Hang enable

Enable the Hang AGC which works like this: Hang is enabled when the signal level exceeds the AGC hang time threshold. When the level decreases (no more speech, for example), the hang counter is enabled and holds the AGC gain constant for the hang time, and after the hang time has expired, the gain increases quite fast (the time until maximum gain is achieved again can be adjusted with AGC HANG TIME). AGC Hang feature is nice for medium to strong SSB signals.

Hang AGC: hang threshold and hang time fully adjustable

  • set AGC Hang enable to ON

  • set AGC Hang time to your prefered time period (in ms)

  • set AGC Hang threshold: while you are tuned to the desired signal, decrease the AGC hang threshold, until the AGC box changes its color to WHITE, decrease a little little bit further --> ready!

AGC-box in a nut-shell:

  • AGC-box is blue without text: AGC not working
    (input signal is lower than AGC threshold)
  • AGC box is blue with text "AGC": AGC is working on the signal
    (input signal is higher than AGC threshold)
  • AGC box is white with text "AGC": AGC is working, HANG AGC is enabled
    (input signal is larger than AGC threshold AND larger than AGC HANG threshold.

If HANG AGC is not enabled, the box will always be blue.

AGC Hang threshold

for signals exceeding this level, the hang AGC is activated. For lower signals, nothing happens

Fixed gain

if the AGC WDSP Mode is “OFF”, the user-adjusted figure for “AGC threshold” is taken as the “Fixed gain” in dB. Be very careful, with large signals without AGC, it can be very very loud!

AGC Attack

This cannot be adjusted by the user and is a constant of 1 millisecond. This is desirable, because when a large signal appears, it is nice to have the AGC react very fast (1ms) in reducing the gain in order to save your ears from damage.

Clone this wiki locally