2419 Feather Mae Ct, Forest Hill, MD 21050 | Phone: 410-340-9019
Products  |  Order  |  Home Features & Specs Software  |  Articles & Reviews  |  Documentation
eMail List  |  News  |  Online Assembly Guide  | Photo Gallery


AGC ... Overview and Usage

Download as PDF


Video showing AGC in action during a contest. 
Absolutely amazing Cube performance now with many strong (and weak) signals in the bandscope!
Notice "AGC action" shown by the moving bar on left side of line above the Battery indicator.
Allows all signals to be seen without the strong ones overloading the receiver.

Welcome to the first release of the SDR Cube software containing Automatic Gain Control.  AGC is an adaptive system found in high-end commercial and professional radios that adjusts the receive channel gain to an appropriate level for a range of input signal levels. For example, without AGC the sound emitted from a receiver would vary to an extreme extent from a weak to a strong signal; and many times, especially in radios implementing software processing of the signal chain (such as in software defined radios), overloading of the codecs/ADCs can cause distortion.  To remedy these situations, the AGC control loop protects intermediate gain stages from becoming overloaded by effectively reducing the volume if the incoming signal is strong and raising it when it is weaker.

In the SDR Cube Transceiver, the feature is perhaps better called “quasi-AGC”, as the implementation is more of an automatic level control that keeps the signals within the numerical range of the FIR filters and other processing blocks. The nature of low-cost embedded SDR solutions like the Cube often call for unique and custom approaches when implementing advanced features – and such is the case with the Cube’s approach to providing AGC.

From the user perspective, the net result of the Cube’s AGC feature is spectacular!  No longer is it necessary to constantly adjust the RF Attenuator control when encountering strong signals that otherwise would overpower and distort the receiver audio. Now, merely setting the RF Attenuator control to a comfortable level will allow you to clearly and comfortably hear a wide range of incoming signals, with the Cube’s internal DSP processor dynamically taking care of gain adjustments to ensure the widest audio ranges are available for the operator.

Operational Characteristics

When AGC is on, the letter “A” is indicated on the main screen to the right of the CW/USB/LSB mode labels (beneath the kHz label for the operating frequency). When AGC is turned off, the “A” is removed.  The default setting for AGC is OFF when v2.00 software is first loaded and run.

AGC is turned on/off in the User Menu. Just tap the Menu pushbutton and notice the initial menu item shown as being AGC. To change the state of AGC, just press the Frequency encoder per normal to select the item, then turn the encoder to the desired state and press the encoder again.  Tap the Menu pushbutton again to return to the main screen.

When AGC is on and there are strong signals present in passband of the RF front end, an “AGC meter” (bar graph) is indicated at the left side of the main display along the horizontal line beneath the operating frequency.  Similar to how the thick Filter line shows on the right side of that horizontal line, whenever the AGC is in action (limiting gain), the ‘meter’ on the left grows to the right. During quiet conditions, the Cube has maximum gain and no AGC meter can be seen.

In this first release of the Cube software containing AGC, we are providing several internal AGC parameter controls that may be manually adjusted by the operator, or upon recommendation of the factory, in order to optimize the settings for the best listening experience. These seven controls are available for operator adjustment in the User Menu, as defined in the next section.  Please refer to the diagram below to help in understanding the various AGC parameters.

AGC User Menu Parameters

1) AGC Knee -- AGC Threshold is sometimes called AGC Knee, which is the limit below which AGC is not working and the output signal rises in direct proportion to the input signal bellow the AGC knee value.

2) AGC Attack  -- Can also be called Fast Peak Filter. This timer prevents the Hang time from starting when single/short signals exceed the current AGC adjustment value.  Fast peaks, however, can cause immediate AGC correction; but in these cases the Hang time is not started.  If we have new signal peak value greater than the existing AGC value and the Fast Peak filter time has elapsed, a new peak value is set as the AGC value and the Hang timer is set/reloaded.

3) AGC Slope -- When AGC is operating the Slope value determines the ratio between the input signal and output signal rise.

4) AGC Hang  -- If the new peak value is less than the current AGC value, but the Hang timer is still running, nothing is done. This means that the AGC attenuator remains unchanged during short signal dips.

5) AGC Release –  If the Hang timer elapses and new peak values continue at a level below the current AGC value, the AGC attenuator starts to decrease. The decrease rate is set by the Release slope value. During the Release slope, new peak values are processed starting from the AGC Threshold detection.

6) AGC Active -- Can be set On or Off.  When off,  no AGC attenuation is calculated. Multipliers are set to 1.0 and the Codec Magnitude selector is set to the value specified in the Codec Mag menu setting.

7) AGC Samples - - IQ signal peak search time.

AGC Parameter Set Values

1) AGC Knee – This is the value of the codec’s output MSB bits. When the RF attenuator is set to 0 dB, the antenna input signal level corresponds roughly to the following values. The useful range is from about 20 to 2000.

-100   dBm      20

  -90   dBm      70

  -80   dBm      200

  -70   dBm      660

  -60   dBm      2170

  -50   dBm      6813

  -40   dBm      21500

 -36.4 dBm      32767 (max)

The setting of the RF Attenuation control proportionally changes the numbers above.

2) AGC Attack – Attack /Fast Peak filter set value is number of IQ sample peak search cycles. For example, if set to 6 and the search time is 3.4 ms, signal peaks are allowed for 20 ms without starting the new hang time.

3) AGC Slope -- Relative gain of how much of an input increase affects the attenuator value.

4) AGC Hang – The Hang timer set value, in milliseconds. For example, a value of 300 ms means that the AGC attenuator value is kept constant for 300 ms if nothing higher than the current peak value is detected.

5) AGC Release -- Units are gain drop / IQ peak search cycle. For example if we apply a maximum attenuation of 65,535 and the release slope is set to 100, it would take 655 x 3.375 ms = 2200 ms to get back to full gain (attenuation = 0).

6) AGC Samples -- Units are multiples of the codec’s 125 us sampling cycle.  For example, a setting of 27 corresponds to 296 Hz (27 x 125us = 3.375 ms = 296 Hz); and because the signal is full wave rectified, one-half of that, or 150 Hz, is the lowest frequency for reliable peak value detection with this setting. Longer peak detection periods yield more reliable results, but at a price of slower response.  The reverse is also true.

 Adjusting the RF Attenuator Control

The RF Attenuator control works as before and controls the incoming signal level with the step attenuators and also controls the codec ADC input level. AGC logic then adjusts the software parameters to the codec output magnitude selector and gain multipliers before the filters.

The goal is to get a good balance between the RF Attenuator control and the AGC action under strong signal conditions. The control should be adjusted so that the ADC (and with very strong signals the RX amp/mixer) is not clipping.  Below this level we then have available 24 dB of AGC dynamic range.

Just set the RF attenuator to according to the current listening conditions and adjust the control so the strongest signal causes the AGC meter reading to be a maximum. Then you have 24dB automatic control range.

Block Diagram

The dynamic range (adjustment capability) of the SDR Cube AGC is 24 dB. Adjustment is implemented with the codec output Magnitude selector in 3x6dB steps and additional 6 dB numeric attenuation. Numeric attenuation is done with multipliers in front of the phase shift FIR filters. Multiplier adjustment ranges from 1 to 0.5, which means 0 to -6dB attenuation.

The analog signal input level to the codec is controlled manually with the RF Attenuator adjustment, which sets the codec input amplifier gain and the RF step attenuators in the Softrock RXAMP module.

Input values to the AGC algorithm are taken from the wide band of signals coming through the RF front end. All signals in the 8 kHz-wide band scope (and a little more) affect the AGC. This is a limitation of the mixing architecture in the Softrock. The AGC signal is calculated so that both I and Q streams at the codec output are rectified and the peak value is determined for a given period of time. After the peak value search time has elapsed, I or Q sample (whichever is greater) is used as the signal peak, which is then input to the AGC algorithm. Immediately after the peak value is measured, a new peak value search is started. The algorithm works in feed-forward mode – there is no feedback from the adjusted output signal.


Copyright 2012 Midnight Design Solutions, LLC.  All Rights Reserved.

Page last updated:  March 6, 2013