AGC LOOP—SLIM VERSION

Sam Wetterlin

3/04/08

swetterlin@comcast.net

 

 

This paper presents the results of tests on the AGC Loop to be used in Scotty’s Spectrum Analyzer. The boards are a modification of my previous design, laid out as SLIM modules. Pictures of the actual assembled boards are shown at the end.  The boards were individually assembled by Dick Gummer, WA8YNV. I then assembled the boards as a unit, experimented with component values and performed the tests described below.  Hopefully they will still work when Dick gets them back.

 

The AGC Loop consists of a Variable Gain Amplifier (VGA) board, followed by a Noise Filter board, followed by the Automatic Gain Control (AGC) board.  The VGA provides the bulk of the variable gain; the AGC board provides the rest, measures the output power, and adjusts the AGC voltage as necessary so the output power level is equivalent to a 1Vp-p sine wave.  At low input signal levels, the meaningful signal can be swamped by broadband noise.  The Noise Filter eliminates much of this noise; it has two switchable filters, one wideband (approx. 900 KHz) and one narrowband (15 KHz).  The wideband filter is needed if the resolution bandwidth of the spectrum analyzer is set above 7.5 KHz or so.

 

You can download the schematic and PCB layouts (ExpressSchem/ExpressPCB format) for the full AGC Loop

 

ACCURACY

 

The assembled board was tested by applying varying input signal levels and measuring the AGC voltage. The results are shown in Figure 1.

 

Figure 1—Response with each filter

Noise causes the response to flatten at the low end. It is

difficult to see here, but the response also flatlines

at the very top end (6 db).

 

Next, a straight line was fit to the response curves (ignoring everything below -85 dbm and above -20 dbm in fitting the curve). The error voltage was calculated for each input level and converted to dbm. The results are shown in Figure 2.

 

Figure 2—Error for each filter

At low signal levels, accuracy is impaired by noise, so the narrow

noise filter performs best at those levels. Voltage readings were taken

with a DMM with 1mV resolution, which may account for fluctuations

of +/-0.1db.

 

 

Accuracy and linearity is excellent until the input level falls low enough that a lot of noise gets amplified and measured as part of the signal.  The narrow filter perform ultimately achieves about a 15 db advantage over the wide filter, closely corresponding to the fact that the wide filter is 60 times the bandwidth of the narrow filter, and 10*Log 60= 18.  It should be possible with calibration to make a crude adjustment to the low level readings, such that the 900 KHz filter should show no worse than 1 db accuracy down to -105 dbm, and the 15 KHz filter down to -120 dbm.

 

NOISE FILTER

 

The first board tested was the Noise Filter.  It is necessary to tune the wideband filter to a center frequency of 10.7MHz. This is achieved with a variable capacitor.  Tuning is not very sensitive or critical. Figure 3 shows the frequency response of the tuned wideband filter.

 

Figure 3--Wideband Noise Filter. This is the frequency response of the noise

filter board by itself. This photo also illustrates a technique for using a sweep

generator with a spectrum analyzer to simulate a tracking generator.  The

sweep generator was set to 100 sweeps/sec and the spectrum analyzer to

5 sec/sweep. A very clean envelope is displayed showing the frequency

response of the noise filter, even though the envelope gets filled with

strange designs.

 

 

When the Noise Filter is combined with the VGA board, which contains an inter-stage LC filter, the net response of the wideband filter is shown in Figures 4 and 5.  The bandwidth comes out near 900 KHz.

 

 

Figure 4--Wideband Noise Filter. This is the combined effect of the noise filter

shown in Figure 3 and the inter-stage filter on the VGA board.  This

image was produced by simply displaying the noise output of the AGC

loop with no signal input. The loop amplifies the noise until the total

noise output reaches the equivalent of a 1 Vp-p sine wave.

 

 

Figure 5--Close-up of wideband noise filter, showing a bandwidth of 900KHz.

 

 

The response of the narrow band crystal filter is shown in Figure 6. Some spurs are present, but have negligible effect on noise filtering.

 

Figure 6--Narrow noise filter. The crystal filter has a nice peak at 10.7MHz plus

somescattered spurs. Those spurs are inconsequential for noise filtering.

 

 

A close-up of the response of the narrow crystal filter is shown in Figure 7.  The bandwidth is 15 KHz and the filter is well centered.  This filter would be used in conjunction with RBW filters of 7.5 KHz or less, so only the small center portion of this curve will impact the ultimate shape of the SA display for a single frequency.

 

Figure 7--Close-up of narrow noise filter.

This image shows a bandwidth of about 15 KHz.

 

 

DYNAMIC RESPONSE

                                                                                           

It can be seen from the above discussion that the AGC loop provides an accurate response when presented with a static signal.  But in the spectrum analyzer, the signal level will constantly change as the SA sweeps through a series of frequency points. The AGC loop must be able to adjust its output rapidly enough to settle to an accurate value at each point.

 

If we scan 2000 points per second, the worst case is that the signal level bounces back and forth between a very high level and a very low level each time we switch points. We can simulate this by presenting the AGC loop with a 10.7 MHz signal modulated with a 1 KHz square wave. (We need 1 KHz rather than 2KHz, because each half cycle represents a scan point).

 

Figure 8 shows the response of the AGC loop with a modulation rate of 3 KHz.  The modulation level causes about a 400mv change in AGC voltage, which corresponds to a 40 db change in input signal level.  The analysis below determines maximum scan rates for accuracy with such 40db steps. To do the same for 80 db steps, just cut the scan rate in half.

 

Figure 8—Response of AGC voltage to a 40db step resulting from modulating

the 10.7MHz signal with a 3 KHz square wave.  The noise filter is set to

the wideband filter (900KHz).

 

The important factor here is the time constant for the rise and fall times, which are approximately 25 us. In seven time constants the signal will accomplish all but 0.03% of the transition. Seven time constants here total 175 us. To allow that time for both rising and falling requires the modulating frequency to be less than 2.8KHz.  That rate in turn corresponds to a scan rate of 5.6K points/second, much faster than we anticipate needing.

 

Figure 8 showed the results using the 900KHz wideband noise filter.  Figure 9 shows the results with the 15 KHz crystal filter.

 

Figure 9—Response of AGC voltage to a 40db step resulting from modulating

the 10.7MHz signal with a 600 Hz “square” wave.  The noise filter is

set to the narrow filter (15KHz). My square wave generator acted strangely

at frequencies below 1 KHz, and the bottom portion of the wave shows the

effects (as does the slant of the flat top part on the wave).

 

The important thing to notice is the ringing at sharp transitions, highlighted in dark blue. This results from the high Q of the crystal filter. Each peak of the ringing takes about 100 uS and reaches a level about half that of the previous peak. For the ringing to fall to 1/1000 of the initial overshoot level requires about 8 peaks, or 800 uS. Allowing this time for both rising and falling transitions requires a modulation rate of no more than about 600 Hz, which corresponds to a scan rate of 1200 points per second.  The narrow noise filter would be used only in conjunction with narrow crystal RBW filters, and ringing caused by those filters will ultimately determine the actual maximum scan rate.

 

Ringing could be reduced by increasing the time constant for the RC filter at the detector output of the AD8367.  This would also slow the transition times in Figure 8, but there is plenty of room to do so.

 

Finally, the AGC voltage is derived in the AD8367 by a power measurement of the 10.7MHz signal, and it is also important that the AGC voltage not contain any significant ripple.  The ripple occurs at 10.7MHz and was measured at -75dbm, which corresponds to a peak-to-peak voltage of about 0.13 mV.  The AGC voltage is scaled at about 10mV per db, so the ripple represents only about 0.013 db, and is negligible. 

 


THE ASSEMBLED BOARDS

 

Figure 10--Variable Gain Amplifier (VGA) Board. This board contains two AD8330 VGA

ICs with a simple 10.7MHz LC filter between the stages.

 

Figure 11—Noise Filter.  This board switches between a wideband LC filter and

a narrow crystal filter.  The crystal filter is bent over the top of some underlying

components and insulated with tape.  The green leaded resistor is not part of

the board; it was used to switch between filters during testing.

 

 

 

Figure 12—Automatic Gain Control (AGC) Board. This board contains

an AD8367 that provides some variable gain amplification and also

generates a DC voltage to adjust the total amplification to produce

a fixed output level, which for a sine wave input is 1Vp-p. In the final

board, a change was made on the trace leading from pin 6 of

the AD8367 and the pin 3 of the op amp at top left.

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 13—Fully assembled boards, with brass shielding strips on the VGA board.

The shielding could be extended around the entire assembly, and a cover added.

However, it is contemplated that this assembly will be placed as-is inside

an enclosure with in/out RF connectors and connectors for power and AGC.

The blue wire on the bottom distributes the 5V supply; about 90 ma is required.

The short copper-colored wire on the bottom was a mistake and was removed.