|
|
|||||||
| Home | Forums | Rules | Articles | Store | Gallery | Blogs | 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 |
|
|
|
Thread Tools | Search this Thread |
|
|
#861 | ||
|
Banned
Join Date: Apr 2003
|
Quote:
Quote:
When I do a loop gain simulation, I usually open up LoopGain2.asc and copy the Ii and Vi sources using F6, then paste into my schematic using Ctrl-V. This changes the reference numbers of Ii and Vi to something like Ii1 and Vi1, so I change the names back to the original Ii and Vi. This is because the loop gain formula refers specifically to Ii and Vi. From LoopGain2.asc, I copy the formula for loop gain and save it as a comment in my .asc file. Then when I need to plot it, I just paste the comment into the expression box of the waveform viewer. |
||
|
|
|
|
#862 | ||
|
diyAudio Member
Join Date: Nov 2008
Location: Brazil
|
Quote:
Sorry I not explained correctly I rename the two resistors responsible for the gain in feedback-link to "RF1" and "RF2", as in the diagram below: http://www.ecircuitcenter.com/Circui..._Amplifier.htm I want to know, is to define the open loop gain for the simulation (method LoopGain2.asc ) I leave it to closed loop gain(Ex: Gain =30dB)? Or set the gain as 1? Quote:
In the figure below, the simulation with closed loop (11dB gain in closed loop ) |
||
|
|
|
|
#863 |
|
diyAudio Member
Join Date: Nov 2008
Location: Brazil
|
In another picture the gain set to 1.
Which of the two figures is correct? Thanks Andy |
|
|
|
|
#864 |
|
Banned
Join Date: Apr 2003
|
Hi Rafael,
I think this is an issue of terminology. Just so we're talking about the same thing, have a look at figure 1 on this page, also shown below. The "open-loop gain" is AOL in the picture. But that's not the quantity simulated by the Middlebrook probe in the LoopGain2.asc. The probe in LoopGain2.asc measures the "loop gain". In the figure above, the loop gain is AOL * beta. That's all the way around the loop, neglecting the minus sign. In your simulations above, you did them with two different values of beta (the resistor divider ratio), so you end up with two different values of loop gain. Each is correct for the particular circuit being simulated. Let's say you wanted to actually simulate the open-loop gain AOL. You might want to do this to compare what SPICE says to the op-amp datasheet plot of AOL. To do that, you don't need the Middlebrook loop gain probe at all. The easiest way is to label the op-amp non-inverting input node as, say, "a", its inverting input node as, say, "b", and its output node as, say, "out". Then just apply an AC input signal and plot V(out)/(V(a)-V(b)). The reason for plotting the loop gain is as follows. If we compute V(output) / V(input) in the figure above, we get: Vout/Vin = AOL/(1 + AOLB) I've used "B" for "beta" above. If the magnitude of AOLB is 1 where its phase is -180 deg, that's the same as AOLB = -1. That would make the denominator of the right hand side of the equation above zero, giving infinite gain, which is the same as having an oscillator. |
|
|
|
|
#865 | |||
|
diyAudio Member
Join Date: Nov 2008
Location: Brazil
|
Hi Andy
Quote:
With this method, is correct for to determine the phase margin, to the circuit does not oscillate (I use Bode) Quote:
Simulate a simple amp in AC analysis (set AC=1) Gain closed loop: 20dB, 1.2Mhz -3dB Gain open loop: 84dB, 980Hz -3dB Middlebrook : 42dB, 5Khz -3dB phase at 0dB, 90 degrees in all Quote:
Attached two circuits simple amp, AOL and Middlebrook (LTspice) Thanks |
|||
|
|
|
|
#866 | ||
|
Banned
Join Date: Apr 2003
|
Quote:
But it is not AOL that we use to determine stability. It is the product of AOL and the feedback factor B. See the picture below for how the op-amp circuit relates to the block diagram. Quote:
-1/(1-1/(2*(I(Vi)@1*V(x)@2-V(x)@1*I(Vi)@2)+V(x)@1+I(Vi)@2)) What does this represent? It represents AOLB. But it is very accurate, because it takes into account all impedance interactions. For example, there is an impedance interaction between the feedback loop and the impedance at the inverting input of the op-amp. So we have this result: AOLB = loop gain = -1/(1-1/(2*(I(Vi)@1*V(x)@2-V(x)@1*I(Vi)@2)+V(x)@1+I(Vi)@2)) It is this expression we must analyze to determine stability. Let's do that. Let's find the phase margin using your attached ex_mid.asc. We run ex_mid.asc and plot the Middlebrook expression: -1/(1-1/(2*(I(Vi)@1*V(x)@2-V(x)@1*I(Vi)@2)+V(x)@1+I(Vi)@2)) which is the same thing as AOLB. It's about 42.5 dB at low frequencies. Next, we find the frequency at which the magnitude of this expression is 0 dB. It is 716 kHz. Since this is the loop gain, and its value is 0 dB (= voltage ratio of 1) at this frequency, we call this the unity loop gain frequency. So we can say the unity loop gain frequency is 716 kHz. Now we look at the phase at this frequency. It is -89.75 degrees. A measure of the stability of a feedback circuit is its phase margin. To compute it, we see how much the phase of AOLB at the unity loop gain frequency differs from -180 degrees. Here is the formula: phase margin = -89.75 - (-180) = 90.25 degrees. This is very stable. A good rule of thumb is that phase margins much less than 80 degrees will start to give some overshoot and/or ringing on a small-signal square wave when doing a transient simulation. So, to sum up: 1) Look at AOLB = loop gain = -1/(1-1/(2*(I(Vi)@1*V(x)@2-V(x)@1*I(Vi)@2)+V(x)@1+I(Vi)@2)) to analyze stability. 2) Find the frequency for which AOLB is 0 dB. This is the unity loop gain frequency. 3) Find the phase shift of AOLB (call it phi) at the unity loop gain frequency. 4) Compute the phase margin from phase_margin = phi - (-180) I hope this makes sense. |
||
|
|
|
|
#867 | |
|
diyAudio Member
Join Date: May 2008
Location: Albany , NY (smallbany)
|
Quote:
I also have a question concerning this loop gain topic . While simulating a new amp , (syn08's VSOP) the gain plot showed something that struck me as strange. (attached) All is textbook 1mhz UG @ 84 degree margin , but At the 180 degree point (3mhz) there is a "dip" of 4db. I never saw this on all the other topologies that I have simulated. Would this "dip " correspond to how this amp is "dead set" against errata.(oscillations) When I do transient simulations I still get killer 80+v slew but without any "ringing" or overshoot even into strange loads (capacitive) . I even ran the more advanced Middlebrook probe to confirm this. Is the simulator "fooling me " or does this amp really have this performance level.I am really considering making this my first 300w+ amp, so your input would be helpful. OS |
|
|
|
|
|
#868 | |
|
Banned
Join Date: Apr 2003
|
Quote:
|
|
|
|
|
|
#869 | |
|
diyAudio Member
Join Date: May 2008
Location: Albany , NY (smallbany)
|
Quote:
margin.. I came up with almost the same even as I use LT as opposed to his pspice. Syn abandoned the thread it seems after giving up the conceptual BJT version.. My main question was the "dip".. is this a sign of some flaw unseen or would it be a ideal plot . I use your 3281/1302's as the baseline model for my NJL's and straight fairchild models for all others.(ksa's) GK tells me I should be getting PPM for even simple textbook designs at full power. when in reality I do not (.005 - .01% thd20 is normal) so lately I begin to second guess myself. OS PS.. your advice with the OPS was always done this way, no hookup before final OP hookup. |
|
|
|
|
|
#870 | ||||
|
Banned
Join Date: Apr 2003
|
Quote:
Quote:
Quote:
Quote:
|
||||
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help with Spice simulation | overmind | Everything Else | 4 | 23rd December 2002 04:58 PM |
| New To Site? | Need Help? |
| Page generated in 0.17087 seconds (88.35% PHP - 11.65% MySQL) with 11 queries |