Go Back   Home > Forums > Design & Build > Software Tools
Home Forums Rules Articles Store Gallery Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

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
Reply
 
Thread Tools Search this Thread
Old 5th April 2009, 03:01 AM   #861
andy_c is offline andy_c  United States
Banned
 
Join Date: Apr 2003
Default Re: Open loop measure

Quote:
Originally posted by Rafael.luc
I am using method Middlebrook to simulate ( LoopGain2.asc in LTspice).

By this method I have to set the in open loop, gain= 1(RF1=1K and RF2=1K), I am sure ?
I'm not sure what that second sentence means, Rafael. Could you rephrase it?

Quote:
Measure open loop is with load or without load?
Simulate with the actual load you're going to use. You can see, for example, how capacitive loads affect stability by doing this.

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.
  Reply With Quote
Old 5th April 2009, 06:36 AM   #862
diyAudio Member
 
Rafael L's Avatar
 
Join Date: Nov 2008
Location: Brazil
Default Re: Re: Open loop measure

Quote:
Originally posted by andy_c


I'm not sure what that second sentence means, Rafael. Could you rephrase it?

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:
Originally posted by andy_c

Simulate with the actual load you're going to use. You can see, for example, how capacitive loads affect stability by doing this.

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.
I think not have problems to implement method.

In the figure below, the simulation with closed loop (11dB gain in closed loop )
Attached Images
File Type: gif ex1_audioamp.gif (32.5 KB, 420 views)
  Reply With Quote
Old 5th April 2009, 06:41 AM   #863
diyAudio Member
 
Rafael L's Avatar
 
Join Date: Nov 2008
Location: Brazil
In another picture the gain set to 1.

Which of the two figures is correct?


Thanks Andy
Attached Images
File Type: gif ex2.gif (45.0 KB, 416 views)
  Reply With Quote
Old 5th April 2009, 05:06 PM   #864
andy_c is offline andy_c  United States
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.

Click the image to open in full size..

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.
  Reply With Quote
Old 6th April 2009, 06:30 AM   #865
diyAudio Member
 
Rafael L's Avatar
 
Join Date: Nov 2008
Location: Brazil
Hi Andy

Quote:
Originally posted by andy_c
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)).
Ok, worked
With this method, is correct for to determine the phase margin, to the circuit does not oscillate (I use Bode)

Quote:
Originally posted by andy_c
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".
Not understand! What is the simulation Middlebrook probe, what I am simulating
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:
Originally posted by andy_c
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.
You explained, the Mathematical of simulation or I need to apply any expression?

Attached two circuits simple amp, AOL and Middlebrook (LTspice)



Thanks
Attached Files
File Type: zip cir.zip (2.1 KB, 39 views)
  Reply With Quote
Old 7th April 2009, 12:49 AM   #866
andy_c is offline andy_c  United States
Banned
 
Join Date: Apr 2003
Quote:
Originally posted by Rafael.luc
Ok, worked
With this method, is correct for to determine the phase margin, to the circuit does not oscillate (I use Bode)
Ok, now you have computed AOL, the open-loop gain of just the op-amp itself. If you try this with an IC op-amp, you can compare the data with the op-amp's data sheet plot of AOL vs. frequency. They should look very similar.

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:
Not understand! What is the simulation Middlebrook probe, what I am simulating
The loop gain probe (or Middlebrook probe) is the combination of current source and voltage source that you have placed inside the feedback loop. You have successfully done this in your attached ex_mid.asc. You computed the formula:

-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.
Attached Images
File Type: jpg loop_gain.jpg (23.2 KB, 376 views)
  Reply With Quote
Old 7th April 2009, 01:34 AM   #867
diyAudio Member
 
ostripper's Avatar
 
Join Date: May 2008
Location: Albany , NY (smallbany)
Quote:
By andy C.-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.
Good job you are doing with the advice ,Andy.
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
Attached Images
File Type: gif vsop_olg.gif (20.4 KB, 346 views)
  Reply With Quote
Old 7th April 2009, 01:48 AM   #868
andy_c is offline andy_c  United States
Banned
 
Join Date: Apr 2003
Quote:
Originally posted by ostripper
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.
Well, unless you're using models that are as close to reality as what Scott uses, then the simulator will always fool you to some extent. It's just a question of how much. Without at least checking every model against the data sheet, it's hard to know. If you're nervous, maybe you could build it up without the output devices. Split the emitter resistor of the drivers into two equal values, and take the feedback from there. If the simulation is badly off, you'll likely see some problems at this level. Then you can tweak the design, and when you feel more comfortable with it, hook up the output devices.
  Reply With Quote
Old 7th April 2009, 02:08 AM   #869
diyAudio Member
 
ostripper's Avatar
 
Join Date: May 2008
Location: Albany , NY (smallbany)
Quote:
It's just a question of how much
I did ask myself that question. He (syn) posted .008thd/70 dg
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 I even listen to the drivers with a 330r headphone
hookup before final OP hookup.
  Reply With Quote
Old 7th April 2009, 02:20 AM   #870
andy_c is offline andy_c  United States
Banned
 
Join Date: Apr 2003
Quote:
Originally posted by ostripper
Syn abandoned the thread it seems after giving up the
conceptual BJT version..
I doubt he's abandoned it. I'm amazed at how prolific he is at cranking out new designs and building them. Dunno how he does it, but I suspect that because of that, he's a busy guy.

Quote:
My main question was the "dip".. is this a sign of some
flaw unseen or would it be a ideal plot .
I don't know. I haven't simulated it, so I haven't had a chance to try experiments to determine where it comes from. If the loop gain were to peak up by a lot after the dip, that may be cause for concern.

Quote:
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.
Well, I don't want to get in the middle of that one. But near clipping, the distortion of a feedback amp increases very rapidly with increases in signal level, so it's possible that a fairly small increase in signal level could cause the difference you're talking about.

Quote:
PS.. your advice with the OPS was always done this way,
no I even listen to the drivers with a 330r headphone
hookup before final OP hookup.
I figured as much, but just wanted to make sure.
  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
Need help with Spice simulation overmind Everything Else 4 23rd December 2002 04:58 PM


New To Site? Need Help?

All times are GMT. The time now is 12:59 PM.

Page generated in 0.17087 seconds (88.35% PHP - 11.65% MySQL) with 11 queries

Copyright ©1999-2012 diyAudio