LM317 compensation

Feb 16, 2018 95 Replies

Roughly speaking, if the control loop is dominant-pole compensated (it is, more or less), then the controller has a phase shift of 90 degrees in the cutoff band.

A pure integrator "plant" (the capacitor's impedance) has a phase shift of

90 degrees as well, hence oscillation (or at least something near it, give or take accidental zeroes or additional poles, pushing it one way or the other).

The only way to stabilize such a system is to push one pole up or down so far that the other no longer has 90 degrees phase shift.

This is usually done by reducing C or adding R, restoring phase margin. He's just demonstrating that it can be done the other way -- brute force.

In practice, a real 300mF (not uF, also, 10^-1 s) capacitor may have enough ESR and ESL (including wiring) that its impedance is not actually that low, even at low frequencies. Doesn't matter; the controller is theoretical (a simple SPICE model), as is the capacitor, so it serves nicely to illustrate theory rather than practice.

The 1 / (2*pi*(10Hz)*(0.3F)) ~= 0.05 ohms corresponds to...drumroll please... the DC output resistance of the regulator, more or less. :-)

Tim

Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website: https://www.seventransistorlabs.com/

Great, thanks Tim.

GH

The other LM317 sim rings more.

John Larkin Highland Technology, Inc trk jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

A three-terminal regulator only has three pins to work with! I was surprised that this worked.

John Larkin Highland Technology, Inc trk jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Of course the same is true of an op amp, if you ignore the power pins. ;)

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com

Or a TL431, an op-amp so bad it has a fuckoff massive ~2.5V input offset voltage, and no I_OH! ;-)

Tim

Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website: https://www.seventransistorlabs.com/

If you're going to get technical, and exclude power pins, an LM317 only has two pins. Or maybe one.

I hate it when people get technical.

John Larkin Highland Technology, Inc trk jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Hmm "fuckoff" I don't remember learning about that metric when I was in school some 45 years ago. my how you can fall behind if you don't pay attention!

Jamie

You are supposed to like it. Another indicator that you chose the wrong path. :-)

Yes, a 317 will ring with ceramic output capacitors, and a 337 will even oscillate with ceramic output capacitors. (Unless you mean by "properly designed" that it doesn't ring, in which case of course not.)

Can be cured with big tantalums on the output, or series resistors between the regulator and output capacitors.

I guess this problem has not been well known in the past because in the past it was very expensive to buy ceramic capacitors with high enough values to replace the electrolytic output capacitor.

I doubted it too, but found out the hard way when: my 337's all oscillated, and the 317s rang so badly that the oscillation ripple on the positive rails was even bigger than on the negative rails.

The 317s wouldn't oscillate by themselves, but they would ring like a bell even after I cured the 337's of oscillation.

I had to scratch off a lot of solder mask and tack on many tantalums to cure my boards. Quite embarassing.

The other problem is that a minority of data sheets quantlfy cap ESR requirements and effects, and many don't mention it at all, especially older ones.

I derate tantalums 3:1 on voltage if they are on a bus with significant current capability. That's not practical on a high-current

30 volt rail.
John Larkin Highland Technology, Inc trk jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

I can't persuade a TI LM317 to oscillate on a breadboard, with ceramic caps, but it does ring.

John Larkin Highland Technology, Inc trk jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Check out the Erroll Dietz article I posted upthread.

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com

It's not quite as big as a metric shitload. :-)

Tim

Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website: https://www.seventransistorlabs.com/

OK. Something new I learnt about a chip I've used for years. By 'properly' I only meant that it fulfilled the basic requirements laid out in the spec sheet - and as was pointed out many older sheets have little to nothing to say about the interactions of size and type of capacitor on the output.

I look forward to the day when a chicken can cross the road without having its motives questioned.

The original LM117 data sheet shows a 10uF elec cap on the adjustment pin, with its effect illustrated in the typical performance plots.

I don't know what the A version is intended to improve, but if you vary from recommended decoupling, you're bound to see performance that is non-optimal in some respect.

The fact that you're using ceramics simply by preference, may be the only issue with this circuit. I don't know about the model, or what you can expect from it, but you should probably suspect anything that responds to 'tuning'.

RL

e

h,

ip

afaict the LM337 is more like an LDO, output is collector rather than emitt er

I hate the way LTSpice hides added parasitic elements, if any, to the passive components. It's better to manually add these explicitly, so others (and yourself) can see them, and evaluate reasonableness of the chosen values.

John, please be aware that ceramic capacitors certainly do not have zero esr. I measured 1210-size Murata, Samsung and Yageo caps, with an HP 4192A LCR meter, and got values between 2.5 and 60 m-ohms for 47uF 16V caps at 5V bias, and 9 to 30 m-ohms for 10uF 35V caps at 15V. As expected for MLCC, the capacitance dropped severely with voltage, but esr didn't change.

These resistances help to stabilize regulators of all types, but also defeat ideal filtering.

Thanks, - Win

Right. That makes it a current source, which forms an integrator into low-ESR output caps.

John Larkin Highland Technology, Inc trk jlarkin att highlandtechnology dott com http://www.highlandtechnology.com

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required