Go Back   Home > Forums > Amplifiers > Solid State
Home Forums Rules Articles Store Gallery Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Solid State Talk all about solid state amplification.

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
Reply
 
Thread Tools Search this Thread
Old 18th October 2011, 04:59 AM   #1
diyAudio Member
 
jkuetemann's Avatar
 
Join Date: Dec 2010
Location: Paris, Ontario
Default Determining Phase and Gain Margins in LTSpice

I may be just a little dense here, but I need a little help wrapping my head around how to determine phase and gain margins in simulation. There are a few terms that I need to verify my understanding or lack thereof. I have books by Self, Slone and Cordell but still don't feel I have it totally straight.

1) Open Loop Gain (OLG) is the native forward gain of the circuit when there is no feedback being applied. Generally shows on a plot as having a very high gain and a narrow bandwidth, dependant on the amount of gain in each stage that is available. The gain drops off towards the dominant pole at -20dB per decade.

2) Closed Loop Gain (CLG) is the gain of a circuit where negative feedback is being applied. Generally shows a useful amount of gain for the real world and a relatively wide bandwidth. Gain will also drop off towards the dominant pole at -20dB per decade.

3) Loop Gain is where I get a little lost. This seems to me to be the amount of attenuation provided by the feedback network so that the OLG is reduced down to the CLG. In other words loop gain is the difference between the OLG and the CLG.

4) Gain Crossover Frequency is the frequency where the OLG=CLG

5) Unity Gain is where the gain (either OLG or CLG as they should be the same before get to this point) is 0dB

I have attached shots of a sample circuit (don't beat me up on it, it's just to get this issue straight in my mind). On the schematic I've labelled the input node, feedback node, and output node. I am determining my OLG and CLG gains algebraically as follows:

OLG=Output/(Input-Feedback)
CLG=Output/Input

So from the plot, I have OLG as ~63.4dB and CLG as ~27.1dB and a Gain Crossover at 45kHz. I attached the cursors to the OLG plot and set the #1 cursor to a gain of unity (0dB) which occurs at 1MHz and the #2 cursor to a phase of -180 degrees which occurs at 10.6MHz. This suggests to me a healthy ~83 degree phase margin and an equally healthy gain margin of ~24dB. The Loop Gain is then ~36.3dB?

Have I done this correctly? Am I missing anything?
Attached Images
File Type: jpg Sample Amp.jpg (443.8 KB, 119 views)
File Type: jpg Sample Plot.jpg (313.3 KB, 117 views)
File Type: jpg Phase-Gain Plot.jpg (338.9 KB, 111 views)
__________________
---Jason Kuetemann---
The greatest trick the Devil ever pulled was convincing the world he didn't exist; and like that, he's gone.
  Reply With Quote
Old 18th October 2011, 05:57 AM   #2
diyAudio Member
 
Join Date: Feb 2008
Location: Melbourne
Jason,
The attached files show how to get LTspice to plot `Open Loop Gain' and `Loop Gain'.

In the `Open-Loop-Gain2' file, the `Loop Gain' is the difference between the `Closed Loop Gain' and the `Open Loop Gain' (ie about 50dB).

Hope this helps,
Paul Bysouth
Attached Images
File Type: jpg Open-Loop-Gain2.jpg (507.2 KB, 100 views)
File Type: jpg Loop-Gain-How-To.jpg (307.4 KB, 99 views)
  Reply With Quote
Old 18th October 2011, 09:07 AM   #3
diyAudio Member
 
Join Date: Apr 2011
This way works for me.

The big inductor disconnects the input and output for AC while keeping the DC conditions as they are supposed to be. If you simply remove the feedback resistor the circuit stops working because of DC imbalances. The big capacitor lets the test signal in, but keeps the ground connection from messing up the DC conditions.

I hope the above makes sense. If not, feel free to ask.
Attached Images
File Type: jpeg openloop.jpeg (160.5 KB, 69 views)

Last edited by ingenieus; 18th October 2011 at 09:10 AM.
  Reply With Quote
Old 18th October 2011, 11:32 AM   #4
AndrewT is online now AndrewT  Scotland
diyAudio Member
 
Join Date: Jul 2004
Location: Scottish Borders
Hi JK,
I too would like to get this into my head, permanently.

I look forward toi confirmation, or otherwise, of the conclusions you have posted.

I note the two posters did not read what you asked.
__________________
regards Andrew T.
  Reply With Quote
Old 18th October 2011, 11:42 AM   #5
diyAudio Member
 
jkuetemann's Avatar
 
Join Date: Dec 2010
Location: Paris, Ontario
I'm glad I'm not the only one! It would be nice to see one of the boards heavy hitters chime in to assist with cementing my understanding.

I know there are other ways to 'expose' OLG and this isn't the root of my question, but rather it is achieving the correct interpretation of the data once you have it. I'd love to hear from someone who really has a good handle on this stuff.
__________________
---Jason Kuetemann---
The greatest trick the Devil ever pulled was convincing the world he didn't exist; and like that, he's gone.
  Reply With Quote
Old 18th October 2011, 12:32 PM   #6
AndrewT is online now AndrewT  Scotland
diyAudio Member
 
Join Date: Jul 2004
Location: Scottish Borders
Unfortunately some of the best contributors to the questions you are asking either volunteered to leave this Forum or were "chucked out".
__________________
regards Andrew T.
  Reply With Quote
Old 18th October 2011, 01:03 PM   #7
diyAudio Member
 
Join Date: Nov 2010
Location: The City, SanFrancisco
Jason

Hope this help;

You've almost got it except that the loop gain is the difference between the open loop and the reciprocal of the amount of feedback.
This reciprocal is not the same as the closed loop gain, but rather the inverse of the amount of voltage one would measure at the feedback node (to the summer) when the output is driven by a swept constant amplitude sinewave.

In your plot this feedback term would be the same as the closed loop gain you have plotted except that it would continue straight (horizontally) at the 25 db level.
Where this feedback and open loop cross, ~45KHz is the crossover frequency. That is the frequency at which the total gain going around the entire feedback loop is 1.

If you just plotted loop gain (in your case) it would look very similar to the open loop except shifted down such that it crosses 0db at 45KHz.

Closed loop gain and the reciprocal of feedback may be the confusing aspect, it might help to understand that the closed loop is the final response, a result of feedback applied to the open loop. In order for the negative feedback to "close the loop and produce the closed loop gain" there must be enough loop gain and when this loop gain is reduced to 1 (0 db) the loop must still have be negative feedback that is it must still have a phase less than 180.

-Antonio
  Reply With Quote
Old 18th October 2011, 11:23 PM   #8
diyAudio Member
 
jkuetemann's Avatar
 
Join Date: Dec 2010
Location: Paris, Ontario
OK, some of these comments are beginning to make some sense.

One thing I have to wonder about when dealing with the simulation and interpreting the plot for phase is the reference point. In the simulation the signal source has a constant phase of 0 degrees, no problem. The signal source, input filter and coupling are outside the feedback loop and so are the poles and zeros they create, yet we are still referencing everything against the source's phase, not the amplifier's input proper, the node labeled Vin. Should we not be taking the Vin node as our reference with respect to phase? Any phase shifts that occur to the signal prior to arriving at Vin are irrelevant insofar as the stability of the feedback loop is concerned, are they not?
__________________
---Jason Kuetemann---
The greatest trick the Devil ever pulled was convincing the world he didn't exist; and like that, he's gone.
  Reply With Quote
Old 19th October 2011, 01:15 AM   #9
diyAudio Member
 
Join Date: Nov 2010
Location: The City, SanFrancisco
Jason

You are correct, the open "Loop" gain and phase refers to inside the loop (less the feedback network).
Its easiest for me to think of 0 phase as where the feedback ends (open loop starts) but it's the same phase no matter where you start as long as you add all the open loop gains and phases together.
Since your plot uses the error voltage as the reference all the external frequency depedancies the signal source has passed through have already been ignored.
This open loop phase at the cross-over will determine your phase margin at least for resistive feedback.
If there is any reactance in the feedback you'll need to add its corresponding phase.
The reactance is one reason the post showing how to directly measure the loop gain (and phase) is so convienent.

Hope this helps
-Antonio
  Reply With Quote

Reply


Hide this!Advertise here!

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Jitter or phase noise in LTSPice fireworks Solid State 9 30th August 2011 11:18 PM
LTSpice, Closed loop gain? Neutrality Software Tools 8 17th August 2011 08:16 PM
Gain of Phase Inverter hpupo Tubes / Valves 10 28th May 2011 02:21 PM
Add gain before or after the phase splitter? qq Tubes / Valves 84 12th June 2008 11:04 AM
Phase-Gain plot, will this oscillate? azira Solid State 105 12th May 2005 07:45 PM


New To Site? Need Help?

All times are GMT. The time now is 04:29 PM.

Page generated in 0.14306 seconds (75.38% PHP - 24.62% MySQL) with 11 queries

Copyright ©1999-2012 diyAudio