Low Ripple/Fast Settling AGC For Oscillator

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Samuel Groner

Well-known member
Joined
Aug 19, 2004
Messages
2,940
Location
Zürich, Switzerland
Hi

I'm currently working on the design of a high performance THD+N analyser. For the oscillator part I'm looking into AGC loops for a state-variable topology. Main requirements are low ripple (for low distortion) and reasonably fast settling time. Here's the current plan: AGC_loop_r1.gif

U1-U3 form the state-variable topology. U6 and U7 make up the rectifier based on the trigonometric identity sin^2 + cos^2 = 1, ideally resulting in zero ripple. U4 sums the square function outputs and the reference level (trimmed by R10). U5 integrates the gain control voltage in order to reduce residual ripple (mainly from U6/U7 errors) and noise. D1 and D2 reduce the integration time constant if the output level of U4 is above some mV to provide fast settling. R8 provides a ripple cancellation trim for low frequencies where the integrator is less effective. The DC gain control signal is fed to U8 (implemented with a pair of opto-resistors and a low-distortion opamp) to provide amplitude stabilisation.

Now a few questions:
* I didn't found a more convincing solution for the square function other than to use four-quadrant multipliers (AD633). Any suggestions for a lower cost solution? I'm aware of the possibility to use norton amplifiers but I don't like the high parts count.
* Is the polarity of the AGC loop correct (i.e. the use of the inverting Y input of U8)?
* Cordell uses another opamp to boost the DC gain of the AGC loop (thd_analyzer.pdf, page 6, IC7 in figure 9). I didn't quite understand the need for this. Anyone?
* In many oscillator designs C3 is paralleled with an series RC (the additional C being much larger than C3), sometimes claimed to improve settling time. How should this work? Any drawbacks?
* It does make sense to use schottky diodes for D1 and D2 as they have lower forward voltages, right?

Thanks for your comments and suggestions!

Samuel
 
[quote author="Samuel Groner"]* I didn't found a more convincing solution for the square function other than to use four-quadrant multipliers (AD633). Any suggestions for a lower cost solution?[/quote]
The LM394 and MAT02 datasheets have circuits for squarers/multipliers.

I would not be surprised if the THAT2180 VCA or THAT2252 RMS detector could easily be adapted to be squarers.

Disclaimer: I've never tried or even simulated any of this, and I would be wary about issues like bandwidth.

JDB.
 
More random ramblings: in RF oscillators dual-gate MOSFETs are sometimes used as oscillator VGA. Would that be useful here, or do those parts have too much 1/f noise for audio circuitry ?

JDB
[very interested in this THD+N analyzer, BTW]
 
It seems the last time we discussed this Brad came up with an article using multipliers made from OTAs. While I personally lean toward using transistor arrays to generate the Sin^2 and Cos^2 terms.

sin_cos.gif


Here is a schematic I scratched out which is just a variant on my RMS convertor. Normal caveats apply.. this is not a proved design.

Two input squared terms are summed through individual transistors, When each are down -3dB, that squared is -6dB or .5x. .5 + .5 = 1

While I was attracted to the elegance of using that trig identity with the natural 90' offset between state variable outputs, I didn't pursue it back then due to complexity. Back in the day, I probably would have mathematically doubled the squaring Vbes to get this down to 5 transistors total to fit in single x5 array. These days I'd probably use two x4 arrays.

You can probably get part way there with the rate dependent loop filters, like i already see in your schematic (diodes that conduct for faster TC at larger errors). In my experience with very low distortion oscillators you often need to accept some extra settling time. Even with the trig identity I suspect you'll want to smooth the result.

Admittedly the last commercial sine wave generator I sold (LOFTECH TS-1) while based on a SVF was something like .15% THD, because customers wouldn't tolerate long settling times in a single 20Hz to 30kHz sweep range. It was cleaner than the function generators of the day, but not as clean as I could get it on the bench using a slower loop TC. :roll:

JR
 
Thanks for your answers!

The LM394 and MAT02 datasheets have circuits for squarers/multipliers.
Here is a schematic I scratched out which is just a variant on my RMS convertor.
These are both basically discrete multipliers, right? I think the parts count is simply a bit high for that application, and the cost is not much lower if we use precision transistor arrays and consider the increased PCB space. An AD633 goes for about CHF 20.- each, which is not horribly high considering that the entire project will likely eat at least 15 AD797 (CHF 25.- each), 4 AD811 (CHF 15.- each) and a few other ICs in that price range.

In RF oscillators dual-gate MOSFETs are sometimes used as oscillator VGA. Would that be useful here, or do those parts have too much 1/f noise for audio circuitry?
So far it is my understanding that FETs used as VCR are less linear than opto-resistors, even if we apply the standard local feedback (at least according to Linear Technology AN-43, page 31). In addition to this opto-resistors are easier to float and allow a configuration to partially cancel distortion when using two devices. But do you have a schematic at hand?

... and I assume you are aware of:
www.tech-diy.com/TestEquipment/SuperOscillator/super_oscillator.htm
Yes. I think it might prove difficult to use this design for a variable frequency (10 Hz to 100 kHz in four ranges is the plan) oscillator. The main problem is the rectifier; while at 10 kHz it's easy to low-pass filter the residual ripple, doing so at 10 Hz will cause a monstrous settling time. In addition to this I'm not sure if it would be necessary to use less decoupling of the VGA in order to guarantee proper amplitude stabilisation over the entire frequency range, causing increased distortion.

But in any case I do consider using similar gain blocks for U2 and U3 (altough the AD797 itself is pretty good up to 10 kHz). Not sure yet if it will proof possible to get stable results if the feedback capacitors are of variable value though.

Samuel
 
just a thought, I was looking at these very issues about a year ago and my web research kept pointing to a piece about low distortion ocsillators that is reprinted in this book:

http://www.amazon.ca/Analog-Circuit-Design-Science-Personalities/dp/0750696400

If you dont have this already, order a copy now. seriously. there is a fantastic discussion on building this kind of circuit. though I have to warn you that getting this book played a role in me getting *distracted* from the LDO project (theres so much other good, thought provoking info in there). well, that and the obscene amount of "real" work Ive had lately.

mike p
 
[quote author="Samuel Groner"][quote author="jdbakker"]In RF oscillators dual-gate MOSFETs are sometimes used as oscillator VGA. Would that be useful here, or do those parts have too much 1/f noise for audio circuitry?[/quote]
So far it is my understanding that FETs used as VCR are less linear than opto-resistors, even if we apply the standard local feedback (at least according to Linear Technology AN-43, page 31). In addition to this opto-resistors are easier to float and allow a configuration to partially cancel distortion when using two devices. But do you have a schematic at hand?[/quote]
Not immediately, will keep looking. I believe Ulrich Rohde (of Rohde & Schwarz fame) had one or two which I found whilst investigating low-jitter xtal oscillators. I believe that generally an oscillator is built around G1 of the FET, and G2 is used for AGC.

JDB.
 
My web research kept pointing to a piece about low distortion ocsillators that is reprinted in this book:

http://www.amazon.ca/Analog-Circuit-Design-Science-Personalities/dp/0750696400
Yes, seen that--there is a paraphrase of the book chapter in the Linear Technology Application Note I mentioned above (AN-43).

While I appreciate that the circuit presented is simple and indeed of good performance I hope that my approach will show an order of magnitude lower distortion (which would be -130 dB at 1 kHz). This is not completely unfeasible (though surely not peanuts either!) as the state-variable topology has inherently lower distortion than Wien-Bridge oscillators due to the low-pass action of the integrators that filters out harmonics. And the AD797 is surely the better opamp than the LT1115 (might not matter at 1 kHz but it does at 10 kHz and up).

Not immediately, will keep looking.
I found one: 62305di.pdf, page 81 ff. Not sure how much use for audio there is?

Samuel
 
The Williams circuit is not fast-settling, which may or may not be an issue depending on the application.

The SVF approach is beneficial especially because of the reduction in common-mode distortion (which was the Williams last-minute novelty to squeeze more performance out of Wien-bridge IIRC).

That book is a great collection to be sure. The article on vertical amplifiers by Addis (if that's the collection it's in) is worth the price of admission. And I am particularly fond of his aside about slaying the time-to-market god.
 
The Williams circuit is not fast-settling, which may or may not be an issue depending on the application.
I think I might need to be more specific--I don't mind having 1 s settling (to ~0.1 dB) above 100 Hz and 3 s for 10 Hz to 100 Hz (by increasing C3 for that range). That should be realistic, right? I'd have started with the following values:
* R13 = 100k
* R14 = 1k
* C3 = 1 uF (100 Hz to 100 kHz) or 3 uF (10 Hz to 100 Hz)

Does this sound about right? Seems to be a bit difficult to calculate settling with the nonlinear integrator.

Any ideas about my other questions?

Samuel
 
Little busy right now, but the multiplier looks like a decent part, the polarity of the loop looked correct at first glance, and the reason for the extra stabilization loop components comes from control theory, to provide additional degrees of freedom to tailor transient response.

Beware of multiplier noise spoiling things a bit.
 
Thanks for checking!

The reason for the extra stabilization loop components comes from control theory, to provide additional degrees of freedom to tailor transient response.
Any further reading on this?

I just run some simulations and it looks like some composite amplifier (as in the Linear Technology "Super Oscillator" application note linked above by JDB) will be suitable for use as integrator with switched feedback capacitor. Which is very promising news I must say!

Samuel
 
[quote author="Samuel Groner"]Any further reading on this?
Samuel[/quote]

Brogan, Modern Control Theory, is not too bad and widely available according to bookfinder.com . Although the second edition is the current one, the first edition (1974 and available in paper) is adequate for the basics and well beyond.

You could also, depending on your simulator, just play with the system---inject a little perturbing signal, say at the reference voltage, and watch the amplitude settling behavior.

EDIT: Even more available and even cheaper: Kuo, Automatic Control Systems.
 
BTW for the first circuit posted you will probably want to restrict the action of U8 to only two quadrants, i.e., operate as a variable gain amplifier rather than a multiplier. Apply one polarity of feedback with a fixed resistor etc. and use the VGA to provide the other for stabilization.
 
Thanks for the literature hints, will check them out.

U8 will be implemented with photo-resistors and an AD797, not a multiplier. At least that's the current plan, will need to breadboard a few implementations to check whether things are good enough.

What's not clear to me yet is the sizing of R5 (in the first schematic). How large can it be chosen? It looks like things depend on opamp (U2 and U3) loop gain as well as capacitor (C1 and C2) loss. Any input on this?

Samuel
 
Nothing specific, but the art of these oscillators generally is to contrive to use as little stabilization as can be gotten away with while still getting reliable startup behavior.

And the old adage comes up: "Amplifiers oscillate, and oscillators don't". Fortunately, today we have decent simulators.

I believe there is some material on one of these in Tobey et al., the old Burr-Brown op amp book. I'm not sure where my copy of it is at the moment.
 
I'd forgotten about sinewave generators in the old burr brown (good book)... I just looked at those pages quickly and I didn't see much that looked low distortion. They even had one osc modulating the impedance of diodes with DC current as a form of gain control. I vaguely recall looking at that diode impedance approach years ago in my search for cost effective VCAs, it didn't make the cut.

There was one tidbit about stability values only being optimal for about one decade. Perhaps not out of the question to vary stability loop time constants with osc frequency.

JR
 
[quote author="JohnRoberts"]I'd forgotten about sinewave generators in the old burr brown (good book)... I just looked at those pages quickly and I didn't see much that looked low distortion.
JR[/quote]

I found my copy (Tobey, Graeme, Huelsman, Operational Amplifiers, Design and Applications, ISBN 070649170) and found the section: see pp. 400-403, with a schematic on pg. 402, "High-performance VCO". The schematic is somewhat lacking in detail, and no numbers are given for expected performance (except that it is "High" :razz: ).
 
Back
Top