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

Offline TMaxElectronics

  • High Voltage Engineer
  • ****
  • Posts: 297
  • Karma: +23/-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 Engineer
  • ****
  • Posts: 221
  • Karma: +6/-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

  • Executive Board Member
  • *******
  • Posts: 2744
  • Karma: +129/-1
  • 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: 297
  • Karma: +23/-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

  • Executive Board Member
  • *******
  • Posts: 2744
  • Karma: +129/-1
  • 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: Big Coil Build Log
[Dual Resonant Solid State Tesla coils (DRSSTC)]
flyingperson23
Today at 05:47:34 AM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
davekni
Today at 04:45:07 AM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
MRMILSTAR
Today at 04:18:27 AM
post Push Pull VTTC
[Vacuum Tube Tesla Coils (VTTC)]
janno288
Today at 01:10:08 AM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
Alberto
March 27, 2024, 10:54:52 PM
post Re: CM400 Induction Heater
[Electronic Circuits]
markus
March 27, 2024, 11:53:42 AM
post Re: OCD Triggering Early + Low Output
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
March 27, 2024, 05:14:36 AM
post Re: Is the UD2.7C under voltage lock out basically worthless?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
March 27, 2024, 04:47:48 AM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
March 27, 2024, 04:41:59 AM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
alan sailer
March 27, 2024, 12:04:34 AM
post Re: Super flat QCW simulation (does this look reasonable?)
[Dual Resonant Solid State Tesla coils (DRSSTC)]
toooldforthis
March 26, 2024, 11:08:14 PM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Benjamin Lockhart
March 26, 2024, 11:07:20 PM
post Re: Is the UD2.7C under voltage lock out basically worthless?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Benjamin Lockhart
March 26, 2024, 10:46:29 PM
post OCD Triggering Early + Low Output
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Saattvik24
March 26, 2024, 09:03:43 PM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
alan sailer
March 26, 2024, 08:46:59 PM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
flyingperson23
March 26, 2024, 05:02:18 PM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
alan sailer
March 26, 2024, 03:16:03 PM
post Re: CM400 Induction Heater
[Electronic Circuits]
Anders Mikkelsen
March 26, 2024, 01:41:49 PM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Benjamin Lockhart
March 26, 2024, 04:48:22 AM
post Re: Re-chargeable 1.5 volt lithium ion AAA batteries
[General Chat]
MRMILSTAR
March 26, 2024, 04:16:37 AM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
March 26, 2024, 04:16:24 AM
post Re: Smoke Screen Machine Protect 950 XP - Teardown of a Smoke Cannon!
[Electronic Circuits]
davekni
March 26, 2024, 04:13:02 AM
post Re: CM400 Induction Heater
[Electronic Circuits]
davekni
March 26, 2024, 04:00:43 AM
post Re: Re-chargeable 1.5 volt lithium ion AAA batteries
[General Chat]
davekni
March 26, 2024, 03:19:18 AM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
thedoc298
March 26, 2024, 01:50:42 AM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
flyingperson23
March 25, 2024, 08:05:02 PM
post Re: Smoke Screen Machine Protect 950 XP - Teardown of a Smoke Cannon!
[Electronic Circuits]
Mads Barnkob
March 25, 2024, 07:41:29 PM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
alan sailer
March 25, 2024, 06:45:46 PM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
flyingperson23
March 25, 2024, 05:44:25 PM
post Re: CM400 Induction Heater
[Electronic Circuits]
Anders Mikkelsen
March 25, 2024, 04:47:17 PM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
alan sailer
March 25, 2024, 04:27:22 PM
post Re-chargeable 1.5 volt lithium ion AAA batteries
[General Chat]
MRMILSTAR
March 25, 2024, 03:57:34 PM
post Re: CM400 Induction Heater
[Electronic Circuits]
markus
March 25, 2024, 02:06:41 PM
post Re: Odd MOSFET Driver Behavior
[Solid State Tesla Coils (SSTC)]
KrisPringle
March 25, 2024, 04:43:25 AM
post Re: Odd MOSFET Driver Behavior
[Solid State Tesla Coils (SSTC)]
davekni
March 25, 2024, 02:39:40 AM
post Re: Odd MOSFET Driver Behavior
[Solid State Tesla Coils (SSTC)]
KrisPringle
March 25, 2024, 12:47:09 AM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
Alberto
March 24, 2024, 07:36:32 PM
post Re: My completed 14-stage Cockroft-Walton voltage multiplier
[Voltage Multipliers]
Alberto
March 24, 2024, 07:27:24 PM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
MRMILSTAR
March 24, 2024, 04:25:23 AM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
Alberto
March 23, 2024, 10:47:35 PM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
MRMILSTAR
March 23, 2024, 09:30:21 PM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
Alberto
March 23, 2024, 04:34:31 PM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
MRMILSTAR
March 23, 2024, 03:04:25 PM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
Alberto
March 23, 2024, 01:38:34 PM
post Re: capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
MRMILSTAR
March 23, 2024, 04:20:03 AM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General Chat]
davekni
March 23, 2024, 12:54:30 AM
post Re: Smoke Screen Machine Protect 950 XP - Teardown of a Smoke Cannon!
[Electronic Circuits]
davekni
March 23, 2024, 12:05:57 AM
post capacitor and diodes. Voltage values for a CW
[Voltage Multipliers]
Alberto
March 22, 2024, 11:45:03 PM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General Chat]
OmGigaTron
March 22, 2024, 11:30:09 PM
post Smoke Screen Machine Protect 950 XP - Teardown of a Smoke Cannon!
[Electronic Circuits]
Mads Barnkob
March 22, 2024, 10:20:35 PM
post Re: Where's all this voltage coming from?
[Spark Gap Tesla Coils (SGTC)]
Benbmw
March 22, 2024, 09:21:13 PM
post Re: What actually kills MOSFETs?
[Beginners]
AstRii
March 22, 2024, 03:37:11 PM
post What actually kills MOSFETs?
[Beginners]
FPS
March 22, 2024, 05:09:20 AM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Benjamin Lockhart
March 22, 2024, 03:57:54 AM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
March 22, 2024, 02:59:25 AM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Benjamin Lockhart
March 21, 2024, 06:31:42 PM
post Re: 2x Panasonic Inverter Microwaves - what to salvage, dangers?
[General Chat]
rikkitikkitavi
March 21, 2024, 03:08:01 PM
post Re: [WTS] IGBT, Ferrite, Capacitors, Tools, PSU, Industrial components and parts
[Sell / Buy / Trade]
Mads Barnkob
March 21, 2024, 01:37:32 PM
post Re: Difference between these transformers
[Transformer (Ferrite Core)]
Alberto
March 21, 2024, 11:42:07 AM
post Re: Phase Lead Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
March 21, 2024, 04:09:14 AM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Benjamin Lockhart
March 21, 2024, 02:15:31 AM
post My Homemade Structural Analysis X-Ray Machine
[X-ray]
Luca c.
March 21, 2024, 01:35:40 AM
post Re: Phase Lead Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Saattvik24
March 20, 2024, 10:40:00 PM
post Re: Difference between these transformers
[Transformer (Ferrite Core)]
Mads Barnkob
March 20, 2024, 08:03:41 PM
post Re: 2x Panasonic Inverter Microwaves - what to salvage, dangers?
[General Chat]
Mads Barnkob
March 20, 2024, 07:51:57 PM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Mads Barnkob
March 20, 2024, 10:39:47 AM
post Re: Phase Lead Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
March 20, 2024, 04:09:59 AM
post Re: 160mm DRSSTC II project | Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Benjamin Lockhart
March 20, 2024, 01:13:23 AM
post Re: Phase Lead Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Keybored
March 20, 2024, 12:45:16 AM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
flyingperson23
March 20, 2024, 12:30:30 AM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Benjamin Lockhart
March 19, 2024, 11:12:24 PM
post Re: 160mm DRSSTC II project | Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Late
March 19, 2024, 09:47:49 PM
post Re: 160mm DRSSTC II project | Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Late
March 19, 2024, 09:44:19 PM
post Phase Lead Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Saattvik24
March 19, 2024, 06:52:09 PM
post Re: 160mm DRSSTC II project | Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
flyingperson23
March 19, 2024, 05:02:44 PM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General Chat]
Mads Barnkob
March 19, 2024, 05:01:41 PM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Mads Barnkob
March 19, 2024, 04:31:02 PM
post Re: 160mm DRSSTC II project | Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Mads Barnkob
March 19, 2024, 03:59:54 PM
post Re: Benjamin's DRSSTC 2 in progress
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Benjamin Lockhart
March 19, 2024, 06:41:39 AM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General Chat]
davekni
March 19, 2024, 04:05:49 AM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General Chat]
OmGigaTron
March 18, 2024, 09:08:35 PM
post Re: Can I Trust This Super Cheap Site?
[General Chat]
2020-Man
March 18, 2024, 09:07:35 PM
post Re: Can I Trust This Super Cheap Site?
[General Chat]
Twospoons
March 18, 2024, 08:57:06 PM
post Re: Can I Trust This Super Cheap Site?
[General Chat]
MRMILSTAR
March 18, 2024, 03:51:33 PM
post Re: 160mm DRSSTC II project | Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Late
March 18, 2024, 02:59:46 PM
post Re: 160mm DRSSTC II project | Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Late
March 18, 2024, 02:33:25 PM
post Can I Trust This Super Cheap Site?
[General Chat]
2020-Man
March 18, 2024, 11:02:12 AM
post Re: Where's all this voltage coming from?
[Spark Gap Tesla Coils (SGTC)]
Twospoons
March 18, 2024, 02:36:11 AM
post Re: Best forum for vacuum tube amplifiers?
[General Chat]
Mads Barnkob
March 17, 2024, 07:42:55 PM
post Re: 2x Panasonic Inverter Microwaves - what to salvage, dangers?
[General Chat]
Michelle_
March 17, 2024, 04:15:14 PM
post Re: 2x Panasonic Inverter Microwaves - what to salvage, dangers?
[General Chat]
Michelle_
March 17, 2024, 05:05:04 AM
post Re: Where's all this voltage coming from?
[Spark Gap Tesla Coils (SGTC)]
davekni
March 17, 2024, 04:50:51 AM
post Re: 2x Panasonic Inverter Microwaves - what to salvage, dangers?
[General Chat]
Twospoons
March 17, 2024, 04:45:17 AM
post 2x Panasonic Inverter Microwaves - what to salvage, dangers?
[General Chat]
Michelle_
March 17, 2024, 04:17:51 AM
post Where's all this voltage coming from?
[Spark Gap Tesla Coils (SGTC)]
Terry
March 17, 2024, 01:29:32 AM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
flyingperson23
March 17, 2024, 12:33:06 AM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Keybored
March 16, 2024, 08:46:20 PM
post Re: Bleeder resistor for MMC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
March 16, 2024, 08:39:24 PM
post Re: DRSSTC Questions
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
March 16, 2024, 08:21:44 PM
post Best forum for vacuum tube amplifiers?
[General Chat]
yourboi
March 16, 2024, 08:20:13 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