Spice simulation
 User Name Stay logged in? Password
 Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read Search

 Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

 Please consider donating to help us continue to serve you. Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
 5th April 2012, 09:29 PM #1131 tvrgeek   diyAudio Member   Join Date: Dec 2009 Location: Md Amplifier stability and Bode plots. I am using LTSpice. It is rather handy as it already gives both voltage and phase in the AC analysis. What I am interested in is playing with different compensation methods in an amplifier. Let's take a traditional long tail pair differential input. Feedback is returned to the negative side. My assumption is that I should be looking at the difference in phase between the signal at the positive node and comparing that to the negative node. I want as little deviation as possible. ( a perfect amplifier returning a perfect copy and no need for correction) I need less that 40 degrees by the time the gain has fallen off to one. When I have done this, sometimes the simulation of a square wave shows instability. Is either my logic or understanding of stability in error?
 6th April 2012, 01:06 AM #1132 keantoken   diyAudio Member     Join Date: Aug 2006 Location: Texas Looking at "loopgain2.asc" in the Examples directory in your LTSpice folder will give you a method for plotting open-loop phase margin. Most people prefer a phase margin of 80 degrees, or an open-loop unity phase of 100 degrees. (I've heard of the 40 degree figure, but I think it is either a mistake or it was taken out of context) Smaller phase margins tend to cause overshoot in the square wave response, and more risk of anomalous oscillation. However the phase margin changes with loading, so you will need to look at phase margin with a number of different loads. If you want a masterful example of stability compensation, look at Symasym. __________________ The Kmultiplier rail filter! -=- The Simple Kuartlotron Superbuffer! Need something built, repaired or modded? PM me and ask what I can do!
kenpeter
diyAudio Member

Join Date: Nov 2007
Location: Dallas
Quote:
 Originally Posted by tvrgeek Amplifier stability and Bode plots. I am using LTSpice. It is rather handy as it already gives both voltage and phase in the AC analysis. What I am interested in is playing with different compensation methods in an amplifier. Let's take a traditional long tail pair differential input. Feedback is returned to the negative side. My assumption is that I should be looking at the difference in phase between the signal at the positive node and comparing that to the negative node. I want as little deviation as possible. ( a perfect amplifier returning a perfect copy and no need for correction) I need less that 40 degrees by the time the gain has fallen off to one. When I have done this, sometimes the simulation of a square wave shows instability. Is either my logic or understanding of stability in error?
Closing a big loop can make the Bode plot appear stable, maybe it isn't.
You should only ever blindly close small local loops of one pole or less.
If there could be more than one pole, it might oscillate.

The easy way to break a loop (and you might have loops inside loops to
test for stability too), maybe not the right or best way, is put 999MegH
simulated inductor into the feedback path. This cuts off all but DC.

Now you can see the output, and tell if amplitude is below unity before
phase rolls completely around. And you probably want some 60 or more
degrees of safety margin... But more will needlessly hurt performance.

I've seen the right way to do this, but still have no understanding of it.
My inductor is a cheat, and will make low frequency appear to roll phase.
Just remember that low roll it isn't really there, you can ignore it...

-----

I am comping an input pair with a capacitively coupled positive feedback
from the opposite collector, called "neutralization". This is a trick to make
Miller capacitance dissapear, so that your dominant pole somewhere else
is acting alone, and not rolling phase cumulatively with the input pair...

In each transistor there is parasitic capacitance from collector to base.
You add an external cap (almost same amount) from base to the other
side of the LTP's collector. Not too much, else you make another fine
oscillator....

I am not a fan of setting the dominant pole's corner just above 1KHz,
and then test for distortion at 1KHz, the sim fakes too low distortion.
Well, its real, bit only for low frequencies... Your distorion is inverse
to how much open loop gain you can afford to throw away in closing.
You have worse distortion than you might imagine at the high end,
cause the open loop gain is rolling away at -6 or -12dB while there
are still more than 4 octaves to be covered.

Mind you, this plot is inverting, so 180 is straight up...
Attached Images
 neutralization1.gif (58.9 KB, 344 views)
Attached Files
 Draft9985.asc (9.0 KB, 23 views)

Last edited by kenpeter; 6th April 2012 at 08:17 AM.

 6th April 2012, 09:11 AM #1134 keantoken   diyAudio Member     Join Date: Aug 2006 Location: Texas The problem with using large capacitors or inductors for this is that if you're not careful your feedback impedance will be different, causing the loopgain plot to not be the same as it is with a closed loop. That is why perfect components are used in SPICE. __________________ The Kmultiplier rail filter! -=- The Simple Kuartlotron Superbuffer! Need something built, repaired or modded? PM me and ask what I can do!
 6th April 2012, 09:49 AM #1135 keantoken   diyAudio Member     Join Date: Aug 2006 Location: Texas Also Kenpeter. You happen to have downloaded my 5200/1943 models before I quickly edited in a last improvement... Look again and you will see the value of VAF has changed. __________________ The Kmultiplier rail filter! -=- The Simple Kuartlotron Superbuffer! Need something built, repaired or modded? PM me and ask what I can do!
keantoken
diyAudio Member

Join Date: Aug 2006
Location: Texas
Here is a version of your schematic with an example of how feedback impedance matters. This time the feedback network doesn't have a series inductor causing high impedance. Open-loop gain is greatly altered.
Attached Files
 Draft9985_Kmods.asc (9.8 KB, 27 views)
__________________
The Kmultiplier rail filter! -=- The Simple Kuartlotron Superbuffer!
Need something built, repaired or modded? PM me and ask what I can do!

kenpeter
diyAudio Member

Join Date: Nov 2007
Location: Dallas
Reason gain went up is that you changed the configuration of the output stage
from A+B to class AB. The big transistors used to be OFF through zero crossing.
The crossing was driven at known current in Class A by BD139/140 exclusively.
Now there is 30dB more crossing (and open loop) gain, but nothing to prevent
thermal run-away.

I am a thankful the finals added gain changed the stability picture so little.
Was a bit concerned that once those outputs conduct, it might be different.
Can see now, I had nothing to worry about. We still need look at condition
where only one side is On, and the other Off. Try a DC offset or something...

Distortion should sim less with AB's added gain and smooth crossing. But you
can't bias a hot output that way without adding parts to watchdog the current.
Emitter resistors at the very least....

I put back to class A+B and observe the open gain hasn't changed at all.
I'm not saying it distorts less in this class, definitely not. Just saying the
open loop gain change you observed, had nothing to do with my 999H being
different (gainwise) than your 100K + 1u + E (Voltage Dependant Voltage).
Attached Files
 Draft9985_Kmods2.asc (9.9 KB, 16 views)

Last edited by kenpeter; 6th April 2012 at 01:51 PM.

Bob Cordell
diyAudio Member

Join Date: Sep 2006
Quote:
 Originally Posted by keantoken Looking at "loopgain2.asc" in the Examples directory in your LTSpice folder will give you a method for plotting open-loop phase margin. Most people prefer a phase margin of 80 degrees, or an open-loop unity phase of 100 degrees. (I've heard of the 40 degree figure, but I think it is either a mistake or it was taken out of context) Smaller phase margins tend to cause overshoot in the square wave response, and more risk of anomalous oscillation. However the phase margin changes with loading, so you will need to look at phase margin with a number of different loads. If you want a masterful example of stability compensation, look at Symasym.
Even 60 degrees of phase margin is OK, IF it is real (meaning SPICE is really capturing and modeling properly all of the sources of excess phase in the real world). Chapeter 4 in my book "Designing Audio Power Amplifiers" covers a lot of this and has a useful plot, 4.10, that shows gain peaking and overshoot as a function of phase margin for a typical arrangement.

Very importantly, gain margin must also be good in order to achieve an amplifier with robust stability. One should have at least 6 dB of gain margin, meaning that the loop gain has fallen to -6dB by the time the phase reaches 180 degrees. Sometimes a designer will inadvertantly do something to a circuit to improve phase margin that only lessens gain margin, and this can be dangerous.

Cheers,
Bob

 6th April 2012, 03:15 PM #1139 keantoken   diyAudio Member     Join Date: Aug 2006 Location: Texas You're right Ken, my mistake. I thought something was off... It seems nice to have textbook geometric response curves. While marginal phase margins can offer extra bandwidth and low HF distortion, they generally result in overshoot or ringing, even if very slight. This quality is known as phase-linearity, AKA constant group delay. You can add this to the long list of potential design objectives... Few people talk about it though. I wonder if more than 6db gain margin is needed. After all, under heavy loading, gain can change more than 6db. BJTs can be a lot faster, especially outputs, at higher currents, and more at risk for oscillation. __________________ The Kmultiplier rail filter! -=- The Simple Kuartlotron Superbuffer! Need something built, repaired or modded? PM me and ask what I can do!
 6th April 2012, 04:11 PM #1140 kenpeter   diyAudio Member   Join Date: Nov 2007 Location: Dallas In conflict of poles, wonder why so many aim for the slowest make it even slower? If you instead speed one up, the other automagically becomes dominant. There is much to be said for an open loop gain that can truly cover the whole audio range. Compensation by a stOOpid slug that kicks in at 1K or worse, this is gonna ruin any chance for a similar low closed loop distortion at 20KHz. Won't see the prob in .FOUR passes run at 1KHz, as this is below the usual slug's knee anyway. Last edited by kenpeter; 6th April 2012 at 04:13 PM.

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Site     Site Announcements     Forum Problems Amplifiers     Solid State     Pass Labs     Tubes / Valves     Chip Amps     Class D     Power Supplies     Headphone Systems Source & Line     Analogue Source     Analog Line Level     Digital Source     Digital Line Level     PC Based Loudspeakers     Multi-Way     Full Range     Subwoofers     Planars & Exotics Live Sound     PA Systems     Instruments and Amps Design & Build     Parts     Equipment & Tools     Construction Tips     Software Tools General Interest     Car Audio     diyAudio.com Articles     Music     Everything Else Member Areas     Introductions     The Lounge     Clubs & Events     In Memoriam The Moving Image Commercial Sector     Swap Meet     Group Buys     The diyAudio Store     Vendor Forums         Vendor's Bazaar         Sonic Craft         Apex Jr         Audio Sector         Acoustic Fun         Chipamp         DIY HiFi Supply         Elekit         Elektor         Mains Cables R Us         Parts Connexion         Planet 10 hifi         Quanghao Audio Design         Siliconray Online Electronics Store         Tubelab     Manufacturers         AKSA         Audio Poutine         Musicaltech         Aussie Amplifiers         CSS         exaDevices         Feastrex         GedLee         Head 'n' HiFi - Walter         Heatsink USA         miniDSP         SITO Audio         Twin Audio         Twisted Pear         Wild Burro Audio

 Similar Threads Thread Thread Starter Forum Replies Last Post overmind Everything Else 4 23rd December 2002 04:58 PM

 New To Site? Need Help?

All times are GMT. The time now is 09:07 AM.