agc preamp distortion

Status
Not open for further replies.
OK. I made a few changes to the "Preamp with AGC Example" circuit that I posted earlier, and got the "attack time" down to around 0 ms (OR, 8 ms; see farther below), with reasonably-good THD figures (THD results are printed on the schematics. See farther below.). Some of the THD numbers for one version are: .00066% at 500 Hz, .033% at 200 Hz, and 0.38% at 100 Hz, and .000035% at 1 kHz, all simulated with the maximum input level.

The schematics AND the LTSpice simulation files for the circuits are linked-to, farther below.

The main changes were: 1.) New topology for the peak detector in the envelope detector section (U1 and U2). 2.) Zener "clamp" after the integrator (U3), to stop the integrator output from going too far below zero, which could cause a latch-up condition, and, if not, slowed the response. 3.) Lower RC time-constants, everywhere in the feedback loop. 4.) DC-blocking capacitors, on the input and output of the analog-multiplier-and-preamp section. 5.) Added buffer U6 for the feedback pickoff, between the output and the peak detector's input.

Aside: I am not really even sure what this circuit should be called, e.g. AGC, ALC, Peak-Limiter, Compressor, or what?
But, if it works for your application, it at least seems to have pretty-good THD levels. However, I am sure that it could be vastly-improved. For example, it might better to divide the input, more, and then take the feedback from between the multiplier and the amplifier. Note also that the "attack" speed is slower for smaller input amplitudes. I haven't looked at that, much, yet.

Actually, the attack time "was" about 8 ms (and "Rise time", or maybe it's called "recovery time", is something like 20 ms, or more). But, "at the last minute", I found that substituting an LT1115 for U1, in place of the LT1122 (since the LT1122 only handles a 40V supply differential), in the peak-detector portion of the envelope detector, somehow made everything start at 0 volts, instead of quickly slewing down from a high initial voltage, when there was a large initial input voltage. I haven't investigated that, very much, yet.

Below are some screen captures, for the two versions, with everything the same except the U1 opamp (and the slightly-different integrator capacitor value, which doesn't affect the phenomenon). Both are for a 200 Hz 20 V P-P input, and both are reaching exactly the same approximately-800 mV 0-P level, at steady-state. (Sorry about the poor image quality.) The first one (LT1122) has 30 ms/div horiz and 2V/div vert. The second one (LT1115) has 20 ms/div horiz and 200 mV/div vert. Each plot shows the sinusoid at the output and the feedback signal applied to one of the analog multiplier's inputs.

WITH THE LT1122 IN THE PEAK DETECTOR:

An externally hosted image should be here but it was not working when we last tested it.


WITH THE LT1115 IN THE PEAK DETECTOR:

An externally hosted image should be here but it was not working when we last tested it.


But, after that, since I didn't need to worry quite so much about the intitial/large-input transient behavior, with the LT1115 peak detector version, I was able to change C2 (integrator's C) from 33 nF to 68 nF, which cut the distortion about in half, and got rid of a little overshoot. However, I didn't yet try to re-optimize anything else, after that, for the "LT1115 U1" version.

It does "make sense", somewhat. It turns out that something "faster" than an LT1115 might be needed, for the peak detector's U1, in order to capture the initial large transients, which might have been expected.

However, maybe the LT1115 version's behavior is actually better? It certainly SEEMS like it's better, to me. But I also wonder if the simulated behavior is similar-enough to reality for it to work like that, in reality. I guess I should at least try simulating it with some other opamps, that are comparable to the LT1115. [But don't hold your breath...! 🙂 ] One other thing that I "might" worry about is whether or not the LT1115 might eventually cause THD to rise, as frequency is increased, if it can't keep pace with the needs of the peak detector's proper operation, at higher frequencies. I didn't have time to get any simulations running at over 2 kHz, in LT-Spice. (But the THD was still falling with frequency, at 2 kHz, for both versions, which would be expected, since the ripple voltage in the feedback to the analog multiplier is better-filtered as the frequency increases.)

Note that in EITHER version, the integrator's capacitor, C2, can be set to a slightly-different value, typically either about 33 nF or about 68 nF, for either faster response or lower distortion. (But note that basically EVERY other component in the circuit also affects the response speed and the distortion level. "You have been warned." 🙂

I also changed the output-level-target spec, from 1.2 V P-P to 1.6 V P-P, mainly just because it was convenient. A buffer amp or a resistive divider could be used after the final output, if some other level is desired. (Or, the entire thing could be redesigned. 🙂 For some applications, especially with the LT1122 version of the circuit, it might also be desirable to use a "hard limiter", e.g. "clamp" circuits, or maybe even just anti-parallel Zener diodes to ground, after the output.

Below is a link to a JPEG image of the schematic, for the version with the LT1115 for U1 in the peak detector (and 68 nF for the integrator's C). With the slower LT1115, it slews upward from 0 volts, for a large initial input, instead of downward from "way too high". (I usually right-click and select "Open in New Window".)

LT1115 VERSION SCHEMATIC IMAGE:

http://www.fullnet.com/~tomg/agc1115.jpg

Below is a link to a JPEG image of the schematic for the version with the LT1122 used for U1 in the peak detector (and 33 nF for the integrator's C). This one has about an 8 ms response time, for max input level. However, there is still a small amount of overshoot, when responding to a max input transient. I didn't have time to try to fully-optimize the response. I don't know if the slight overshoot will matter, or not.

LT1122 VERSION SCHEMATIC IMAGE:

http://www.fullnet.com/~tomg/agc1122.jpg

Below is a link to a small ZIP file with all of the necessary LT-Spice files for simulating both versions.

Right-Click and select "Save Target As", to download the
LT-SPICE SIMULATION FILES:

http://www.fullnet.com/~tomg/diyagc2.zip

It's probably best to save and then extract them to their own folder or directory (probably within your SWCADIII (LtSpice) program folder or directory).

That's all, for now. I still don't really know what this circuit is good for. Comments are welcome.

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
gootee said:
2.) Zener "clamp" after the integrator (U3), to stop the integrator output from going too far below zero, which could cause a latch-up condition, and, if not, slowed the response.

I meant to write "Schottky diode "clamp"", instead of "Zener "clamp"".

ALSO:

I just checked the power dissipation of some of the components (Alt-Right-Click on any component to plot it, in LT-Spice), and was a little surprised to see that in the LT1115-for-U1 version, the LT1115 that serves as the U1 opamp in the peak detector is shown to be dissipating an almost-constant 348 mW! That seems a bit high, to me. Oddly, maybe, it's only pushing about 0.253 mA P-P, max (+171 uA to -82uA), while the output voltage is swinging about 1 V P-P, between .042v and -0.988v. Maybe it doesn't like the +/-22V supply voltages? The + supply pin shows about 7.9 mA and the - supply pin shows about -7.9 mA. The input pins are both in the under-100nA range.

Oh. Never mind. It looks like ALL of the opamps are dissipating that much power. It must be due the the +/-22V rails. The AD633JN is dissipating about 200 mW.

350 mW seems like a lot, especially for a plastic DIP-8 package. The LT1115 is also available in a 16-lead DIP package. Glue-on heatsinks are commonly-available for those, at least (but can be cut for DIP-8, easily). But it might be better to try lowering the supply voltages.

In the LT1122-as-U1 version, which uses +/-18V rails, the opamps are mostly dissipating about 284 mW, in steady state, except that the LT1122 U1 (peak detector) is only dissipating about 252 mW. The AD633JN is dissipating about 155 mW.

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
The schematic JPG images that I posted should (still) be available.

It might also be good to experiment with changing the compression threshold, and limiting the gain for lower-level inputs. One way to sort-of do both is to connect a second Schottky diode after the integrator, with its anode connected to the integrator opamp's output and its cathode connected to a positive voltage source.

The circuit already limits the gain, for low input levels, due to the integrator opamp's max output voltage limit, due to the power supply rails. But if you lower the max integrator output voltage even more, by clamping it, you can force the circuit to behave more like a compressor. That way, the output levels, for various input levels, will be more spread out, between the target value and zero, instead of always trying to be AT the target value. More of the lower-level signals will have proportionate-to-input output levels, while the higher-level signals will still be limited to the target max output level. Lowering the clamping voltage will push more of the output levels down and away from the max output level, allowing more of the output levels to be proportional to their input levels.

You could probably use an adjustable voltage regulator, to set the voltage at the schottky's cathode. Or , you could use a resistive voltage divider connected to the positive supply rail.

If you decide to try using a resistive voltage divider, be aware that you'd need to use fairly low-value resistors, to make the clamping "stiff enough". So you'd have to calculate their power dissipation ratings, since they'd likely be more than 1/4 Watt. You can try it in LT-Spice, with the LT1115.asc circuit (But change the power supply sources to +/-18v). Note that the resistors you use would probably need to be able to carry about the maximum current that the integrator opamp can provide.

Something like 50 Ohms to ground (maybe 1W), from the Schottky's cathode, and then maybe 220 Ohms (maybe >= 2W) plus a "set level" resistance in series (maybe >= 1K Ohms max), to the +18v rail, might work OK.

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
I posted earlier about the thatcorp chipsets; the same chips used in dbx and other professional processing boxes. Here are some ap notes for simple compressors:

http://www.thatcorp.com/datashts/dn107.pdf

http://www.thatcorp.com/datashts/dn118.pdf

http://www.thatcorp.com/datashts/dn125.pdf

Here's a link of the thatcorp 4301 anlog engine/ic dynamics processor. I've used these chips in custom processors I've built for clients for the last several years. They include a VCA, RMS detector and 3 op amps. They are available in small quantities from Mouser, and from a vendor on epay.

http://www.thatcorp.com/datashts/4301data.pdf

These chips are high quality, easy to use once you understand the math, and are very versitile. At the very least, check out the ap notes on the site for information.
 
Status
Not open for further replies.