The Art Of Compensation

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

Have been thinking about compensation of opamps; look at this schemo: [removed]

This configuration has a noise gain of 6 dB; if I set C2=0 pF, I need C1=10 pF to make this stable (a well behaved load and source is assumed). But I can choose C2=100 pF (more or less blind guess) and C1=0 pF and it will be equally stable, right? Or anything in between...

So what are the tradeoffs here? What about slew-rate and high-freq (outside audio range) distortion?

Thanks for input!

Samuel
 
IIRC there is a TI book from the 70/80s? that goe into some detail about some of the questions. I will try to find the book if I still have it.

FWIW TI had great books about circuit design in the 70s.
 
Sam,

I have found this paper by Deane Jensen very useful to understand
compensation challanges.
paper

There is a big difference between the two cases you have described. C1 is inside a local feedback loop of the opamp itself. C2 is in the "global" feedback of the amplifier. I don't not think you can equate them. The opamp should be stable at unity gain in the first place by using C1 before you add C2.
C2 cuts down on the bandwidth by making high frequency apmlification go to unity gain or less. It makes sense as the capacitor bypasses the feedback resistor at high frequencies. So if you force higher frequencies to unity gain, but the opamp is not stable at unity you will get high frequency crap.
By adding a resistor in series with C2 you can manipulate things so that you get less amplification at high frequencies, but you don't allow the gain to fall below the opamp's stability threshold.

Tamas
 
As Tamas says, your feedback cap forces the amp to unity gain at some high frequency. Unless you do better than blind-guess, the amp has to be unity gain stable already. (Yes, in certain cases a cap here will defer phase lag and improve stability, but the effect is minor on a 6dB amp and in practice very subject to load and stray capacitance.)


Very Basic opamps

National's The Monolithic Operational Amplifier 30 years old but still the best.

CF amp with summary of voltage-feedback stability

Thanks, Tamas, for finding Jensen audio amp compensation paper
 
I've just built a headphone amp based on this.
mackiehpamp.jpg

thanks to frank voutto for the image.

Been reading the compensation articles, but I'll have to read em a few more times, I'm not 100% clear how to do the math, but then again I'm no EE and I suck at math.

meanwhile, this design with no compensation caps is giving me a BIG LUMP at the bottom of a 1VRMS- 1K sine wave test signal with the input pot open all the way.
I've added 100mhz ferrite beads on the output. no change.
the 5532 and 5534 datasheets pretty much indicate what caps to use so I know what the ballpark should be.

I'm more curious what I should be doing with my signal generator and what I should be looking for on the scope to see If i've knocked off the problem.


Anyhow, with all the reading I think I understand, and so basically the higher the value of compensation cap, the lower the frequency of the Low Pass Filter, with a 47pf cap I've got a completely clean sine wave all the way through...

In practice though, what is "best"? should one push the cap as small as possible for extended frequency response or keep it on the high side for increased stability. In theory, the filter is out of audio range and up into 10+ Mhz range with either the 47pf or with a 100pf.

But I'm curious what ears and experience have told us.

Does a smaller value make for a more "responsive" or "open" sounding amp, or is this all too far away from hearing range to make any difference?


Thanks
Sleeper
 
Samuel, I have to figure out how to upload to this site- I just found the photo area... edit: Done, but I still have to scan. later today.

I'll also have to scan this.

but to describe it,

the first amp is a 5534.
I was testing with 1VRMS- 1K sine wave test signal

I got oscillation at output of the 5534
so the 10k has a 47pf in parallel
oscillation gone.

BTW- both op-amps are bypassed on +and- supply with a 10uf tantalum cap and a parallel .01ufpoly
 
I just left pin 8 disconnected.
If you look at the datasheet, this seems to be OK.
if you choose to add them, the higher the value the slower the slew rate
gain also drops quite significantly even with a value as low as 20pf.

I was looking at the DIY SSL9K preamp, it has a cap there, but at very low value- 3.3pf.

I wish I knew more about the tradeoffs... why would you need this, what applications, but the datasheet doesn't help much on that front, didn't quite get this from the links either. In the end, C1 cured the oscillation. so that's all I did.

I'm only just hitting the point where I'm not constantly blowing things up. (although I did manage to fry a couple of voltage regulators on the headphone amp) hopefully one of the real brains will add some insight here.

Best
Sleeper
 
I just left pin 8 disconnected. If you look at the datasheet, this seems to be OK.

Did not look carefully at the datasheet, but I would suggest that it is not OK; for unity gain, ya need 22 pF. In your case, we have a gain of +5.55, so we need 22 pF/5.55=4 pF. So grab a 5 pF and your design well be very happy. In addition to this, add a 47 pF in parallel to the 10k feedback resistor. This will reduce bandwith to 1/(2*pi*10e3*47e-9)=340 kHz and improve stability even further.

if you choose to add them, the higher the value the slower the slew rate

What will limit the slew-rate of your design? The 5532 at the output with 5 V/us. There is no point using way higher slew-rate amps ahead of this. Even with 15 pF compensation, slew-rate of the 5534 will be better than the 5532.

gain also drops quite significantly even with a value as low as 20pf.

I don't think it drops significantly for your application. It drops about 5 dB @ 10 kHz. Even with this drop, you'll have way more feedback @ 20 kHz than the 40 dB one uses as thumb rule.

You're looking at the datasheet, not measuring anything, right?

I was looking at the DIY SSL9K preamp, it has a cap there, but at very low value- 3.3pf.

If you look again, you see that they have a complex feedback network in the first and second gain stage; that's why they can use such low values. Designing these cap/resistor networks is nontrivial and involves very likely some trial and error.

I wish I knew more about the tradeoffs...

In short, I would say that stability has highest priority. If your amp is close to oscillation, it will sound bad.

So choose an appropriate compensation cap for the noise gain in your application. Then limit the bandwith of your design by adding a suitable feedback-cap to anywhere between 100 kHz and 400 kHz. Of course, you need good grounding, layout and bypassing as well.

Does this help?

Samuel
 
> for unity gain, ya need 22 pF. In your case, we have a gain of +5.55, so we need 22 pF/5.55=4 pF. So grab a 5 pF...

Actually, the sheet says stable without external cap for gains over 3. So at gain of 5 he should be fine. So there is some other flaw in his implementation.

However I do think a 10pFd or 22pFd cap would be good to try. Slew and GBW are still ample. Hell, everything we hear has been through a few unity-compensates 5532/5534s already.
 
[quote author="Samuel Groner"]

You're looking at the datasheet, not measuring anything, right?

[/quote]Right

I only have a 20mhz scope and a signal generator- that, plus the fact that I'm just making up the tests in my head- poking around and looking at signals, changing input frequency around, and listening alot...

Anyhow, besides obvious things like the lumpy oscillation that I WAS seeing, previous to adding any compensation caps at all, and presuming that I don't have a distortion analyzer. are the any other particular places or things to test for...

The thing sounds pretty cookin' right now, but before I button it up I'm going to have one more look around.



Anyhow, dees ees good conversation
Sleeper
 
Anyhow, besides obvious things like the lumpy oscillation that I WAS seeing, previous to adding any compensation caps at all, and presuming that I don't have a distortion analyzer. are the any other particular places or things to test for...

Almost forgot this thread...

You could put a (fast) square wave trough your circuit and scope it after the 5534 and at the output. You should not see much overshoot there, otherwise it would probably be better to use higher compensation caps.

Samuel
 

Latest posts

Back
Top