Electronics-Related.com
Forums

LM317 compensation

Started by John Larkin February 15, 2018
"George Herold" <gherold@teachspin.com> wrote in message 
news:80fce401-9ad3-4904-a249-c4f7014ff123@googlegroups.com...
> How do you get 10Hz, 10^-2 sec. from 300uF? (where's the ~30 ohms) > > I like your circuit, I've never had any issue's with the '317, but > I think I've always used it with a tant or Al cap.
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/
On Friday, February 16, 2018 at 11:05:27 PM UTC-5, Tim Williams wrote:
> "George Herold" <gherold@teachspin.com> wrote in message > news:80fce401-9ad3-4904-a249-c4f7014ff123@googlegroups.com... > > How do you get 10Hz, 10^-2 sec. from 300uF? (where's the ~30 ohms) > > > > I like your circuit, I've never had any issue's with the '317, but > > I think I've always used it with a tant or Al cap. > > 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
Great, thanks Tim. GH
> > -- > Seven Transistor Labs, LLC > Electrical Engineering Consultation and Contract Design > Website: https://www.seventransistorlabs.com/
On Fri, 16 Feb 2018 12:18:19 -0800 (PST),
bloggs.fredbloggs.fred@gmail.com wrote:

>On Friday, February 16, 2018 at 12:51:24 PM UTC-5, John Larkin wrote: >> On Fri, 16 Feb 2018 08:57:05 -0800 (PST), >> bloggs.fredbloggs.fred@gmail.com wrote: >> >> >On Thursday, February 15, 2018 at 8:32:35 PM UTC-5, John Larkin wrote: >> >> LM317's like some ESR in their output capacitors. I don't want any >> >> electrolytic or tantalum caps in my new thing, just ceramics, and the >> >> sim sure rings: >> >> >> >> https://www.dropbox.com/s/11b3w42nsvpliki/317_nocomp.jpg?raw=1 >> >> >> >> But this fixes it: >> >> >> >> https://www.dropbox.com/s/9q80heyfbwh5frp/317_comp.jpg?raw=1 >> >> >> >> This ain't rocket science, but I haven't seen it done before. >> > >> >317 needs no such ESR compensation. >> >> The data sheet says it does. >> >> > The ringing looks suspiciously like excitation of the SRF of an output capacitor. >> >> The frequency is low, and is different on the rising and falling edges >> of the load current pulse. It's the chip pseudo-inductance resonating, >> not the cap's ESL. If the ringing were local to the caps, my damping >> on ADJ wouldn't fix that. >> >> Cap series L makes a different waveform than paralleled inductance. >> >> >> > Did your model give it any ESL? And your solution merely reduces the shunt resistance by a factor of 20x which probably has more to do with damping than anything else. >> >> With a big cap from ADJ to ground, it rings badly, too. It has to be >> the *right* capacitor to damp the ringing. >> >> I tried this with two different LM317 models; the ringing is somewhat >> different (the LT317 is better), but the damping idea is the same. >> >> It's amazing that LT ever made a 317. I think they did that early on, >> when they needed some revenue. They want $4 for it! I'm paying less >> than a tenth of that for TI. > >I doubt you're going to see this energetic resonance on anything other than the LT part.
The other LM317 sim rings more. -- John Larkin Highland Technology, Inc trk jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On Fri, 16 Feb 2018 22:05:34 -0600, "Tim Williams"
<tiwill@seventransistorlabs.com> wrote:

>"George Herold" <gherold@teachspin.com> wrote in message >news:80fce401-9ad3-4904-a249-c4f7014ff123@googlegroups.com... >> How do you get 10Hz, 10^-2 sec. from 300uF? (where's the ~30 ohms) >> >> I like your circuit, I've never had any issue's with the '317, but >> I think I've always used it with a tant or Al cap. > >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.
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
On 02/17/2018 03:57 PM, John Larkin wrote:
> On Fri, 16 Feb 2018 22:05:34 -0600, "Tim Williams" > <tiwill@seventransistorlabs.com> wrote: > >> "George Herold" <gherold@teachspin.com> wrote in message >> news:80fce401-9ad3-4904-a249-c4f7014ff123@googlegroups.com... >>> How do you get 10Hz, 10^-2 sec. from 300uF? (where's the ~30 ohms) >>> >>> I like your circuit, I've never had any issue's with the '317, but >>> I think I've always used it with a tant or Al cap. >> >> 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. > > A three-terminal regulator only has three pins to work with! I was > surprised that this worked.
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
"Phil Hobbs" <pcdhSpamMeSenseless@electrooptical.net> wrote in message 
news:p6a929$e7j$1@dont-email.me...
> > Of course the same is true of an op amp, if you ignore the power pins. ;) >
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/
On Sat, 17 Feb 2018 17:07:04 -0500, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>On 02/17/2018 03:57 PM, John Larkin wrote: >> On Fri, 16 Feb 2018 22:05:34 -0600, "Tim Williams" >> <tiwill@seventransistorlabs.com> wrote: >> >>> "George Herold" <gherold@teachspin.com> wrote in message >>> news:80fce401-9ad3-4904-a249-c4f7014ff123@googlegroups.com... >>>> How do you get 10Hz, 10^-2 sec. from 300uF? (where's the ~30 ohms) >>>> >>>> I like your circuit, I've never had any issue's with the '317, but >>>> I think I've always used it with a tant or Al cap. >>> >>> 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. >> >> A three-terminal regulator only has three pins to work with! I was >> surprised that this worked. > >Of course the same is true of an op amp, if you ignore the power pins. ;) > >Cheers > >Phil Hobbs
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
In article <p6acao$4k0$1@dont-email.me>, tiwill@seventransistorlabs.com 
says...
> > "Phil Hobbs" <pcdhSpamMeSenseless@electrooptical.net> wrote in message > news:p6a929$e7j$1@dont-email.me... > > > > Of course the same is true of an op amp, if you ignore the power pins. ;) > > > > Or a TL431, an op-amp so bad it has a fuckoff massive ~2.5V input offset > voltage, and no I_OH! ;-) > > Tim
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
John Larkin wrote:

> I hate it when people get technical. >
You are supposed to like it. Another indicator that you chose the wrong path. :-)
On 16/02/2018 17:47, David Eather wrote:
> On Fri, 16 Feb 2018 14:46:33 +1000, John Larkin > <jjlarkin@highlandtechnology.com> wrote: > >> On Thu, 15 Feb 2018 22:31:09 -0500, bitrex >> <bitrex@de.lete.earthlink.net> wrote: >> >>> On 02/15/2018 08:32 PM, John Larkin wrote: >>>> >>>> >>>> LM317's like some ESR in their output capacitors. I don't want any >>>> electrolytic or tantalum caps in my new thing, just ceramics, and the >>>> sim sure rings: >>>> >>>> https://www.dropbox.com/s/11b3w42nsvpliki/317_nocomp.jpg?raw=1 >>>> >>>> But this fixes it: >>>> >>>> https://www.dropbox.com/s/9q80heyfbwh5frp/317_comp.jpg?raw=1 >>>> >>>> This ain't rocket science, but I haven't seen it done before. >>>> >>>> >>> >>> Straight Darlington output emitter follower voltage regulators are meh, >>> maybe relics of when you couldn't make a decent high beta PNP on a chip >> >> I'm regulating +48 down to to +30, which few LDOs will do, and I have >> the 317's in stock. >> >> I thought this was a cute trick, but everybody's a critic. >> >> > > > I have never heard of a 317 ringing in a properly designed real > application. Anyone seen it? >
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.