Author Topic: OpAmp regulator stability calculation  (Read 388 times)

Offline TMaxElectronics

  • High Voltage Engineer
  • ****
  • Posts: 216
  • Karma: +12/-0
    • View Profile
    • My random (and very empty) electronics blog
OpAmp regulator stability calculation
« on: April 07, 2021, 01:42:23 PM »
After taking the analog circuits course at my university I thought it might be a cool idea to build an OpAmp regulated power supply. Nothing fancy only 30V 3A linear with a switched pre regulator, and maybe dual tracking if I could be bothered. But I've hit a dead end trying to figure out if the circuit is stable. I have calculated the loop gain and phase depending on the load impedance by cascading the voltage gain of the opamp, the base resistor and the current gain of the drive and the pass transistor, and got a phase margin of something like 60°. However simulating the circuit in spice shows that it is not stable at all and starts to oscillate wildly even just under ramped output voltage conditions.

So my question is: Did I make some sort of mistake analysing my circuit or are the non-idealities of all of the components too big a factor to analyse this the old fashioned way? I would kind of like to get this running without using spice just for practice if that's possible ;)

Here's the circuit after I compensated the OpAmps. It is stable in the configuration shown.


This is not 100% the way I'll build it btw (mainly since the switched pre-regulator isn't there), but I think a close enough approximation for a POC. I'll change the output current sense to be differential and in the positive output path instead of to ground, and I have to think of some better way of limiting current. I want to keep the supply voltage for the control stuff single rail if possible and right now that means it could only limit to ~4V before the voltage drop across that diode causes problems.

Offline Twospoons

  • High Voltage Technician
  • ***
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Re: OpAmp regulator stability calculation
« Reply #1 on: April 07, 2021, 11:20:26 PM »
the non-idealities of all of the components too big a factor to analyse this the old fashioned way?

^ this.

I long ago gave up hand calcs for all but the simplest analog systems.  Running AC spice sims with complex models is much faster, and more accurate.   The thing to take out of the analog circuits course is not how to calculate things like phase margin, but more understanding what the results mean - and from that you can improve your circuit.  Seeing your circuit is unstable is one thing, but more important is understanding why its unstable.

With your current limit feed back  you could use a MOSFET or BJT instead of a diode, to get rid of the v drop; or you could invert your signal, flip the diode, and feed into the negative opamp input, overriding the voltage feedback.
« Last Edit: April 07, 2021, 11:23:19 PM by Twospoons »

Offline davekni

  • High Voltage Expert
  • ******
  • Posts: 1293
  • Karma: +62/-0
  • Physicist, engineer (electronic), and hobbiest
    • View Profile
Re: OpAmp regulator stability calculation
« Reply #2 on: April 07, 2021, 11:37:03 PM »
Quote
The thing to take out of the analog circuits course is not how to calculate things like phase margin, but more understanding what the results mean - and from that you can improve your circuit.  Seeing your circuit is unstable is one thing, but more important is understanding why its unstable.

I certainly agree, but believe that some practice hand-calculating is the best way to gain the understanding.  It is also very helpful to be able to make rough estimate calculations during initial design.  That can drastically reduce the number of iterations needed in simulation/refinement.

It looks like V1 is the input voltage to your regulator, but is shown as a sine function.  Are you sure you have appropriate DC bias conditions when running AC analysis?  I find that the most common pitfall of AC analysis - analyzing under the wrong DC state, not the intended operating point.  Sometimes AC analysis needs to be ran across sweeps of DC voltages and currents.  Transistor gains and capacitances and frequency response change with voltage and current.
David Knierim

Offline TMaxElectronics

  • High Voltage Engineer
  • ****
  • Posts: 216
  • Karma: +12/-0
    • View Profile
    • My random (and very empty) electronics blog
Re: OpAmp regulator stability calculation
« Reply #3 on: April 08, 2021, 12:55:30 AM »
Quote
I long ago gave up hand calcs for all but the simplest analog systems.

Yeah I was kind of expecting that haha. But as dave said I want to kind of know the manual way of calculating stability to get that feeling for what I need to do. Just placing capacitors to sort of slow the opamp down and then playing with the values hardly results in a properly engineered circuit to me :P

Quote
It looks like V1 is the input voltage to your regulator, but is shown as a sine function

Yes in deed it is. It has a 35V bias which I must admit is the worst case and probably inaccurate especially for the very low output voltages but was good enough to see if my circuit idea would even work :D
It is an ac source to allow for PSRR calculation, which I did by adding an ac signal to the source and running a sweep. gave me something like a bandpass with -40dB between maybe 1kHz and 10kHz falling off at 20dB/dec to around 80dB (all simulated at 30V output with a 3A load).

I have yet to do simulation of load regulation, but the overcurrent limit with a ramped output voltage and a resistive load works well and has almost zero over or undershoot when regulation starts.

Quote
you could use a MOSFET or BJT instead of a diode
Yeah kind of obvious that one... should have thought of that :D

Another thing I am wondering about is how I could implement the switching regulator voltage control. I guess it would be simple enough if I used the optocoupler feedback all of those chinesium USB power supplies use, and instead of using a zener diode use a differential amplifier that measures the voltage across the pass transistor and compare that to say 3V or something. But I'm guessing that would have fairly poor load regulation right? (even though that would technically be taken care of by the linear part of the reg). I couldn't really think of a better way of communicating the desired output voltage to the pwm regulator in any other way.

And finally (so much new stuff to ask about I'm sorry :P) has anybody got experience in self winding mains driven flybacks for low-ish output voltages? (certainly low for flybacks on this forum haha). I have done this quite a bit with E-Cores for low voltage stuff (converting 5V to 24V and stuff like that) but I'm kind of hesitant to make something mains powered with that technique. Is there maybe some special high voltage double insulated secondary wire I could use or am I overthinking things a little and mylar between the windings is perfectly fine?
« Last Edit: April 08, 2021, 12:57:44 AM by TMaxElectronics »

Offline davekni

  • High Voltage Expert
  • ******
  • Posts: 1293
  • Karma: +62/-0
  • Physicist, engineer (electronic), and hobbiest
    • View Profile
Re: OpAmp regulator stability calculation
« Reply #4 on: April 08, 2021, 04:15:15 AM »
AC for V1 makes sense now.  Hadn't noticed that the "30" parameter was DC offset rather than amplitude.

When you run AC simulation, is V3 set to some non-zero voltage?  If left as a ramp starting at 0V, AC simulation likely uses that 0V condition, so no output current.

As drawn it looks like you have little if any phase margin with unity gain at just under 1us (~200kHz).  Typical current gain of the two BJTs is likely around 20,000.  The integrator R8/C4 has unity gain at 1us.  At 1us, current through R1 * 20,000 and then to C3 has a gain of 2.  (C3 impedance is 0.1 ohms at 1us, so the 10ohm load is insignificant.)  At 1us, C1 to R3 adds only a tiny bit of phase-lead, perhaps about enough to compensate for delays through the BJTs.

I'm not sure if the above paragraph's abbreviated hand analysis is clear or not.  It is the sort of rough analysis I do during design before getting to simulation.

Separate from stability, you will find that BJT current gain has wide tolerance and poor temperature stability.  D45H11 has almost 3:1 change from -40C to 125C die temperature.  Minimum gain is 60 with no maximum specified.  This is typical.  Gain (beta) is determined by many factors, thickness of the thin base layer being one of the hardest to accurately control.  For one-off home designs I'll sometimes use BJT current gain directly as in your circuit.  For any real industrial circuits BJTs need to be used with emitter degeneration or other circuit features to minimize the effect of current gain changes.

Have fun learning!
David Knierim

High Voltage Forum

Re: OpAmp regulator stability calculation
« Reply #4 on: April 08, 2021, 04:15:15 AM »

 


* Recent Topics and Posts

post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Netzpfuscher
Today at 07:26:30 AM
post Tesla plate
[General Chat]
Duane B
Today at 01:54:49 AM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
September 23, 2021, 09:08:23 PM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Uspring
September 23, 2021, 07:09:23 PM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
September 23, 2021, 05:46:38 PM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AFreshLad
September 23, 2021, 11:12:25 AM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Netzpfuscher
September 23, 2021, 08:49:51 AM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
September 23, 2021, 06:15:34 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
davekni
September 23, 2021, 05:48:40 AM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Uspring
September 22, 2021, 07:21:12 PM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AFreshLad
September 22, 2021, 10:41:20 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
davekni
September 22, 2021, 07:07:48 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AFreshLad
September 22, 2021, 05:26:40 AM
post Re: Measuring TC secondary parameters
[General Chat]
MRMILSTAR
September 22, 2021, 05:14:30 AM
post Measuring TC secondary parameters
[General Chat]
Duane B
September 22, 2021, 05:01:22 AM
post Re: Load resistance and discharge terminal for my 14-stage CW multiplier
[Voltage Multipliers]
MRMILSTAR
September 21, 2021, 10:33:34 PM
post Re: Futurist's DRSSTC 0.5
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Mads Barnkob
September 21, 2021, 07:21:50 PM
post Re: Load resistance and discharge terminal for my 14-stage CW multiplier
[Voltage Multipliers]
klugesmith
September 21, 2021, 05:24:35 PM
post Re: BrOdin coil - High power Big sparks!
[Dual Resonant Solid State Tesla coils (DRSSTC)]
futurist
September 21, 2021, 04:18:47 PM
post Load resistance and discharge terminal for my 14-stage CW multiplier
[Voltage Multipliers]
MRMILSTAR
September 21, 2021, 06:30:44 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
davekni
September 21, 2021, 06:04:52 AM
post Re: BrOdin coil - High power Big sparks!
[Dual Resonant Solid State Tesla coils (DRSSTC)]
fh89
September 21, 2021, 03:56:28 AM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
johnnyzoo
September 20, 2021, 09:24:10 PM
post Re: BrOdin coil - High power Big sparks!
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Uspring
September 20, 2021, 05:07:43 PM
post Re: Large Rectifier Tube
[General Chat]
Benbmw
September 20, 2021, 04:12:27 PM
post Re: Proper phase lead adjustment at the input
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Chrisader
September 20, 2021, 10:40:33 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AFreshLad
September 20, 2021, 10:39:59 AM
post Re: BrOdin coil - High power Big sparks!
[Dual Resonant Solid State Tesla coils (DRSSTC)]
futurist
September 20, 2021, 10:38:31 AM
post Re: Large Rectifier Tube
[General Chat]
klugesmith
September 20, 2021, 07:07:55 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AFreshLad
September 20, 2021, 06:03:57 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
davekni
September 20, 2021, 05:31:57 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AFreshLad
September 20, 2021, 04:59:17 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AFreshLad
September 20, 2021, 04:28:03 AM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
September 20, 2021, 12:53:39 AM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
johnnyzoo
September 19, 2021, 11:09:37 PM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
AstRii
September 19, 2021, 09:47:14 PM
post Re: Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
September 19, 2021, 08:28:05 PM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
davekni
September 19, 2021, 08:19:01 PM
post Idea for QCW DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
AstRii
September 19, 2021, 07:58:09 PM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AFreshLad
September 19, 2021, 03:16:40 PM
post Re: Driverless MOSFET SSTC
[Beginners]
AstRii
September 19, 2021, 01:32:47 PM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AFreshLad
September 19, 2021, 10:15:24 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
Magneticitist
September 19, 2021, 06:32:18 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
davekni
September 19, 2021, 06:06:44 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AFreshLad
September 19, 2021, 04:14:18 AM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
Magneticitist
September 18, 2021, 11:33:37 PM
post Re: Help with SSTC feedback circuits with 4046 IC and Schmitt Triggers
[Solid State Tesla Coils (SSTC)]
AstRii
September 18, 2021, 10:42:45 PM
post Re: BrOdin coil - High power Big sparks!
[Dual Resonant Solid State Tesla coils (DRSSTC)]
fh89
September 18, 2021, 09:05:03 PM
post Re: BrOdin coil - High power Big sparks!
[Dual Resonant Solid State Tesla coils (DRSSTC)]
fh89
September 18, 2021, 09:00:32 PM
post Re: BrOdin coil - High power Big sparks!
[Dual Resonant Solid State Tesla coils (DRSSTC)]
AstRii
September 18, 2021, 08:34:15 PM

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 
SimplePortal 2.3.6 © 2008-2014, SimplePortal