The Frugalamp by OS

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
So "loopgain' is a module of LT that you can insert into any circuit??

I know how to get the circuit built on LT, run an efficiency test
on it to simm hoe component choices would behave, I can scope a
point, measure a point, etc.

I am weak on all the options allowing me to do more advanced
analysis on the circuit...
Os
 
ostripper said:
So "loopgain' is a module of LT that you can insert into any circuit??

Try the simplest approach first by opening up the audioamp.asc and using its technique and formula in your circuit. That is, put the floating voltage source in the feedback loop of your amp, use F4 to name the "A" and "B" nodes on either side of the voltage source, and plot V(A)/V(B) to see the loop gain.
 
I'm not sure why you're renaming A and B. Try this.

Open up audioamp.asc file in the educational folder.
Choose "Simulate, Edit Simulation Command".
Click on the "AC Analysis" tab.
For "type of sweep" choose "decade".
For "points per decade" enter 100
For start frequency, enter 100
For stop frequency, enter 10e6.
Click OK. After doing so, the cursor will have a box attached to it. Move the cursor to somewhere on the schematic and left-click it. This will place an AC analysis command in the sim.
Press the "run" button. A blank graph will appear. Right click on the graph and choose "Add Trace"
In the "expression to add" box, enter V(A)/V(B). Click OK or press Enter.
You should see a graph of the loop gain.

Once you get this working with audioamp.asc, try it with your own circuit.
 
Hi OS
Spice is nice, like any software it's good to know what to expect beforehand.

>That's why I asked if anyone still relies on Bode plots by hand using 5 cycle semilog paper. Calculate max gain of each stage (OLG=3 stages added in dB) locate and plot poles and zero's from that.
 
Thank you ,andy.. I thought you had to comment at a
command line or such.. but spice
lets you comment directly on GUI, then run the whole thing.

I have 2 curves , I assume 1 is "a" and 1 is "b".
(gain and phase)
also , I would do the same to a circuit I modeled..??
Is there a list of other commands beside gain and phase??
(Is it dot commands??)
Now I get it, the commands are computed against the models
in the library..(components) in a nice graphical form...
OS:D
 

GK

Disabled Account
Joined 2006
andy_c said:


Try the simplest approach first by opening up the audioamp.asc and using its technique and formula in your circuit. That is, put the floating voltage source in the feedback loop of your amp, use F4 to name the "A" and "B" nodes on either side of the voltage source, and plot V(A)/V(B) to see the loop gain.


:nod:
That's what I did to plot the loop gain in post 111. The best way to quickly inspect and experiment with the relationship between LTP gm / OLG, CLG and Cdom.

Cheers,
Glen
 

GK

Disabled Account
Joined 2006
ostripper said:
I "blindman" sees clearly, glen.. I did have a hard time seeing the
degen. resistor values to compare your outputs..


If you are referring to post 111 the degen resistors were 150 ohms all round. I know with the resolution limit the values are hard (or impossible) to read, but I didn't think it mattered as the important part of that pic (WRT to point I was making in that post) was the loop gain plot.

Cheers,
Glen
 
Its nice to see it rather someone just telling you a CM gives you 10db more gain. Is it the difference in attenuation at HF that
you are pointing out..
Can spice also show you phase vs. frequency with other values
of Cdom???

Sorry already figured that one out...it can show phases anywhere
in the circuit simultaniously if run w/ the same simulation command.
:cool: :cool: :cool:
 

GK

Disabled Account
Joined 2006
ostripper said:
Its nice to see it rather someone just telling you a CM gives you 10db more gain. Is it the difference in attenuation at HF that
you are pointing out..
Can spice also show you phase vs. frequency with other values
of Cdom???


As stated I was pointing out the fact that the decreased open loop gain by ditching the current mirror in favor of a pair of load resistors changes the open loop bandwidth, not the unity loop gain frequency (with the the value of Cdom unchanged).

Also, if the VAS if buffered with EF's the CM gives much more than an extra 10dB gain (and lower open loop bandwidth), but the Cdom rule outlined in the paragraph above still applies.

BTW, you should forget about the collector-base version of miller compensation with this type of topology all together (it’s not ideally suited) and do what Bob Cordell did in his MOSFET amp. However this is a little more complex to examine in LTspice as you then have 2 loops to inspect. However the feedback cap is really easy to calculate for fixing the desired unity loop gain frequency.
I'm busy with other things now so you’ll have to nag Andy C for an explanation on this one :D :D

Cheers,
Glen
 
You opened up a 'can of worms here' for me..
,spice can show Ic and
all other circuit variables Vs. freq.
I have only used it to simulate statically because I didn't how
to edit a sim command.One can see not only IF a circuit works
but HOW it works under a more sophisticated simulation.

No wonder you guys are "hooked" on it...:)
 
Well ,I have it..sim city.:D
An externally hosted image should be here but it was not working when we last tested it.


It amplified, all currents set (8mA VAS's/ 2ma LTP)
balances perfectly- .01Ma either side of each..

An externally hosted image should be here but it was not working when we last tested it.


As far as gain/phase , I,m not sure I did it right, as this amp I
modeled in it's entirety, not sure it's only OLG??

An externally hosted image should be here but it was not working when we last tested it.


I,m only starting but have all the favorite trannies in my model
library (had to figure that one out) and can really "pump out the circuits" now.

thanks andy and GK,i,m really hooked.
OS
 
Looks like you're making good progress there ostripper.

If you change that plot of V(b)/V(a) to -V(b)/V(a) you will be looking at the so-called "loop gain".

For a little bit about the loop gain idea, see Figure 1 of this Wikipedia article for a block diagram.

You have the open-loop gain, which is called AOL in that diagram. Then there's the feedback factor B, which, if C4 were not present, would be R12/(R12+R11) = 1/34 in your circuit (assuming C5 is a short). The open-loop gain AOL is approximately the ratio of the AC output voltage to the voltage difference between the non-inverting and inverting inputs of the input diff pair.

Here's the short description of stability theory. The closed-loop amplifier gain ACL in Figure 1 of the Wikipedia article is:

ACL=AOL/(1+AOLB)

Now the product AOLB is a complex number, having amplitude and phase. Suppose the amplitude of AOLB were 1 and its phase were +/- 180 deg at some frequency f0. That's the same as the real number -1. Then the denominator of the expression above for ACL would be zero, giving infinite gain at the frequency f0. But that's what an oscillator is. So you want the phase of AOLB to be far away from +/-180 deg at the frequency for which the magnitude of AOLB is 1 (same thing as 0 dB).

The difference between the actual phase shift of AOLB at the frequency for which its magnitude is 0 dB, and the "drop dead" value of -180 deg is called the phase margin.

Your circuit has a problem because its loop gain begins to flatten out above 100 kHz. That's caused by C4. Try removing C4, or setting it to some silly value like 0.01 pF, and plot -V(b)/V(a) (note the minus sign). Find the frequency at which its magnitude is 0 dB. That's called the unity loop gain frequency. Then look at the phase at this frequency. To pick a number, assume it's -120 degrees. That will give a phase margin of 60 degrees. To prevent overshoot in the transient response, shoot for a phase margin of 80 degrees. This may involve tweaking the input stage emitter degeneration or the Miller comp cap or both.

To look at actual data points on the graph, left-click on the graph label text at the top (the V(b)/V(a)). This will give you a cursor that you can drag and read the amplitude in dB and phase in degrees.

Edit: Just to clarify, if you plot -V(b)/V(a), that is the same as AOLB, which is the so-called loop gain.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.