¿ªÔÆÌåÓý

Date

Weird behaviour for ylog scale

 

Hello - first time in this forum,

a small misbehaviour I have found in using the logscale for e.g. a dc
sweep of a diode:
Everytime we have made a new simulation we must adjust the lower
bound of the yaxis in log scale. It goes to the default 1e-25, also
if I gave 1e-12 before.

Thanks for the great program
Dietmar
------------------------
Dr.-Ing. Dietmar Warning
DAnalyse GmbH
Schkopauer Ring 5
12681 Berlin
Germany
Tel.: 030 93498 230
Fax.: 030 93498 231
email: warning at danalyse dot de
URL:


Re: Open Loop response for OpAmp

Steve Steckler
 

John,
?
I?enjoyed the constructive discussion.
?
Steve.

john_oztek wrote:
Steve,

The two (simplified) approaches are not exactly the same.? The
voltage sources do not provide impedance isolation as the voltage
controlled voltage source does.? However, your point is well taken.?
My approach only works well if the "high impedance" load actually
maintains a high impedance in relation to the driving source
impedance (the op-amp output in this case).? Inserting an artificial
low impedance in the loop eliminates the need to also consider the
current loop gain, but in doing so ignores the effect of loading on
the source.? If the loading is insignificant, as it is in your
example, then this approach is quite accurate (try it, it reproduces
your more precise plot exactly except that phase is inverted.? If
this assumption is not valid, then Middlebrook's method is required.

I should mention that I use this sort of analysis mostly when
designing power supplies, inverters, motor drives, and other
relatively low bandwidth circuits and systems.? It's therefore been
easy for me to ensure that the driving impedance is always low in
relation to it's load at the injection point, at least over the range
in frequency that I'm interested in.? Thanks for alerting us to the
pitfalls of using a simplified approach, and presenting a
more accurate method.? This was a very interesting and useful thread!

- John


--- In LTspice@..., Steve Steckler wrote:
> John,
>?
> I finally thought about you idea a little more. It really is not
different than inserting a series voltage source. The problem with
this approach is that there is often not a high impedance point. For
example, at high frequencies, there are no "high" impedances.
The "Middlebrook" method allows breaking the loop at any convenient
point, and particularly when a high impedance point doesn't exist.
>?
> Steve
>
>
> john_oztek wrote:
> Steve,
>
> As Mike pointed out, your 100 ohm load really isn't a high
impedance,
> so the current through it can't be ignored.? Since this situation
is
> usually the case in most practical circuits,? I always insert a
unity
> gain voltage controlled voltage source in front of the "high
> impedance" node when running this sort of analysis.? I tried this
> with your circuit and it reproduces your corrected plot except that
> the phase is reversed.
>
> Regards,
> John
>
>
>
>
> --- In LTspice@..., Steve Steckler
wrote:
> > Mike,
> >?
> > I don't want to push this too far since you may not be too
> interested in this particular problem, but I'm attaching the
results
> of the open loop simulation of an opamp circuit using LTSPice. If
you
> believe what you see, the upper plot pane shows the corrected loop
> gain, while the lower one shows the uncorrected one you get by just
> taking the ratio of the voltages at both ends of the injected
voltage
> source.
> >?
> > As you can see, the two sets of gain and phase plots are
> substantially different. Incidentally these results are similar to,
> but not exactly the same, as those shown in
> soft.com/news/spring97/loopgain.shtm. I usually remove the hacks
and
> change some other things when running this kind of simulation,
which
> I didn't do this time, but I believe the results show a trend. In a
> previous simulation, when I made some of the setup changes, the
> results matched the article more closely.
> >?
> > The differences between the two plots are greater than I would
have
> expected, so if one is interested in more accurate simulations of
> open-loop gain, this approach seems to warrant its complexity.
> >?
> > I haven't done any careful comparisons by other methods at this
> point, but I believe there is some truth to all of this! I didn't
> create macros as the article did, but wrote an equation for the
> corrected response.
> >?
> > It's just food for thought.
> >?
> > Regards,
> >?
> >??????????????? Steve
> >?
> >
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
>
>
> Yahoo! Groups SponsorADVERTISEMENT
>
> To unsubscribe from this group, send an email to:
> LTspice-unsubscribe@...
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!



To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


Do you Yahoo!?
- Now only $29.95 per month!


Re: Open Loop response for OpAmp

 

Steve,

The two (simplified) approaches are not exactly the same. The
voltage sources do not provide impedance isolation as the voltage
controlled voltage source does. However, your point is well taken.
My approach only works well if the "high impedance" load actually
maintains a high impedance in relation to the driving source
impedance (the op-amp output in this case). Inserting an artificial
low impedance in the loop eliminates the need to also consider the
current loop gain, but in doing so ignores the effect of loading on
the source. If the loading is insignificant, as it is in your
example, then this approach is quite accurate (try it, it reproduces
your more precise plot exactly except that phase is inverted. If
this assumption is not valid, then Middlebrook's method is required.

I should mention that I use this sort of analysis mostly when
designing power supplies, inverters, motor drives, and other
relatively low bandwidth circuits and systems. It's therefore been
easy for me to ensure that the driving impedance is always low in
relation to it's load at the injection point, at least over the range
in frequency that I'm interested in. Thanks for alerting us to the
pitfalls of using a simplified approach, and presenting a
more accurate method. This was a very interesting and useful thread!

- John


--- In LTspice@..., Steve Steckler <leckerts@y...> wrote:
John,

I finally thought about you idea a little more. It really is not
different than inserting a series voltage source. The problem with
this approach is that there is often not a high impedance point. For
example, at high frequencies, there are no "high" impedances.
The "Middlebrook" method allows breaking the loop at any convenient
point, and particularly when a high impedance point doesn't exist.

Steve


john_oztek <joconnor@o...> wrote:
Steve,

As Mike pointed out, your 100 ohm load really isn't a high
impedance,
so the current through it can't be ignored. Since this situation
is
usually the case in most practical circuits, I always insert a
unity
gain voltage controlled voltage source in front of the "high
impedance" node when running this sort of analysis. I tried this
with your circuit and it reproduces your corrected plot except that
the phase is reversed.

Regards,
John




--- In LTspice@..., Steve Steckler <leckerts@y...>
wrote:
Mike,

I don't want to push this too far since you may not be too
interested in this particular problem, but I'm attaching the
results
of the open loop simulation of an opamp circuit using LTSPice. If
you
believe what you see, the upper plot pane shows the corrected loop
gain, while the lower one shows the uncorrected one you get by just
taking the ratio of the voltages at both ends of the injected
voltage
source.

As you can see, the two sets of gain and phase plots are
substantially different. Incidentally these results are similar to,
but not exactly the same, as those shown in
soft.com/news/spring97/loopgain.shtm. I usually remove the hacks
and
change some other things when running this kind of simulation,
which
I didn't do this time, but I believe the results show a trend. In a
previous simulation, when I made some of the setup changes, the
results matched the article more closely.

The differences between the two plots are greater than I would
have
expected, so if one is interested in more accurate simulations of
open-loop gain, this approach seems to warrant its complexity.

I haven't done any careful comparisons by other methods at this
point, but I believe there is some truth to all of this! I didn't
create macros as the article did, but wrote an equation for the
corrected response.

It's just food for thought.

Regards,

Steve





---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Yahoo! Groups SponsorADVERTISEMENT

To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.



---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


Re: Very small bug (type) in symbol editor

 

Michael,

there's a little typing mistake in the menu structure:
Symbol Editor
Edit->Attributes->Attribute Widow
---
Thank you very much for the report! The correction will
be in update Version 2.03u.

--Mike


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


Very small bug (type) in symbol editor

telyn_de
 

Hello Mike,

there's a little typing mistake in the menu structure:
Symbol Editor
Edit->Attributes->Attribute Widow
---

MAybe you can fix this with one of the next updates :-)

Greetings from Germany

Michael


Re: Open Loop response for OpAmp

Steve Steckler
 

Alex,
?
I thought you came up with an interesting solution. It certainly works fine in this particular case. I don't want to beat a dead horse, but?this method?often won't work. It would not be unusual to have a dc balancing or biasing resistor to be placed in series with the noninverting input of the opamp. Then, the input impedance at that point might not be negligible. There are also many real situations in which the amplifier only has one finite-impedance input.
?
Also, as mentioned in the last post to Mike, for the?high-frequency cases that I'm really interested?in, there are just no?high-impedance points.
?
I just used the op-amp circuit to illustrate the dual injection method. It demonstrates pretty well that you can inject voltage and current at any cut-point in the circuit regardless of impedance.
?
Steve
?
?
?
?

chumpomatic2000 wrote:
Dear Chaps,

Why not try my method - for simulators only

Version 4
SHEET 1 980 680
WIRE -352 112 -352 176
WIRE -352 176 -416 176
WIRE -352 176 -352 240
WIRE -416 176 -416 192
WIRE 160 144 32 144
WIRE 256 64 224 64
WIRE -32 64 -32 144
WIRE 272 -16 224 -16
WIRE 224 -16 224 64
WIRE 224 64 -32 64
WIRE 192 128 192 -16
WIRE 192 -16 -352 -16
WIRE -352 -16 -352 32
WIRE 192 192 192 352
WIRE 192 352 -352 352
WIRE -352 352 -352 320
WIRE -32 224 -32 256
WIRE 336 -16 384 -16
WIRE 384 -16 384 64
WIRE 384 64 336 64
WIRE 384 64 384 160
WIRE 384 160 224 160
WIRE 160 176 80 176
WIRE 32 144 -32 144
WIRE 416 160 384 160
WIRE 80 224 80 176
FLAG -416 192 0
FLAG -32 256 0
FLAG 80 304 0
FLAG 32 144 a
FLAG 80 176 b
FLAG 416 160 out
SYMBOL voltage -352 16 R0
SYMATTR InstName V1
SYMATTR Value 25
SYMBOL voltage -352 224 R0
SYMATTR InstName V2
SYMATTR Value 25
SYMBOL Opamps\\LT1001 192 96 R0
SYMATTR InstName U1
SYMBOL res 352 48 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R1
SYMATTR Value 1k
SYMBOL cap 336 -32 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C1
SYMATTR Value 3p
SYMBOL res -48 128 R0
SYMATTR InstName R2
SYMATTR Value 1k
SYMBOL voltage 80 208 R0
WINDOW 123 24 132 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value2 AC 1
SYMATTR InstName V3
SYMATTR Value 0
TEXT 280 304 Left 0 !.ac dec 100 1 1G
TEXT 280 352 Left 0 ;plot V(out)/V(b,a) for open loop gain
TEXT 280 384 Left 0 ;plot V(a)/V(b,a) for loop gain



To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


Do you Yahoo!?
- Now only $29.95 per month!


Re: Open Loop response for OpAmp

Steve Steckler
 

Mike,
?
My interest in this whole loop gain simulation originated in my desire to characterize a 600 MHz oscillator. At that frequency, the highest input impedance is a finite complex impedance that cannot be ignored. The same would be true for a high frequency amplifier. I have seen several cases where the "high impedance" approach was taken, and the circuit design was a failure as a result of this error. Even with the "Middlebrook" appraoch, it easy to get the wrong results, for example, by getting the directions of the measured currents or voltages reversed! I try to do a sanity check with a simpler circuit using the same injected current and voltage senses.
?
Fortunately, for the oscillator case, I have found that driving the resonator with a voltage source and evaluating the real and imaginary parts of the simulated current tells you what you need to know. It gets even more interesting with a push-push amplifier in which two paths have to be dealt with simultaneously.
I find all this?a pretty?gascinating subject and I believe a very important one. It's easy to take a shortcut that doesn't give good results. Of course, as?in any problem, if the assumption can? be justified, such as at low frequencies, ?the simpler approach?may be completely?viable.
?
Steve
?

Panama Mike wrote:
Steve,

> The concept seems to be that it many cases there really is no
> perfect place to put the injected voltage source, so with this
> method you don't have to worry about that.

That's correct, except that my own experience is that it rarely
comes up that I can't find an appropriate place to interject the
signal.? This is similar to the case in real life where you can
break the feedback point to measure the open loop voltage gain.
That too must be done at a point where a low impedance point feeds
a high impedance one.? Commercial instruments that measure open
loop response from the closed loops system usually also make the
approximation that I'm able to do in simulation.

> By the way, on a related issue - I tried putting the relatively
> complicated equation for the ecorrected loop response into a
> behavioral model. First I tried just putting in the ratio of
> the two voltages; It took the node voltages but would not do
> the division of the two voltages. It just ignored the division.
> I'm not sure whether the Bv block is capable of doing the math
> functions; the brief information on Bv seems to indicate that it is.

The B-source is linearized in the .op and then acts as a linear
element just like any other SPICE element.?

> Therefore my two questions are:
>
> 1. Can I use a behavioral model to evaluate and save
>??? an _expression such as this one?

You can for real data, but the complex data of a .ac analysis
is a small signal linear analysis and the behavior of the B-source
might be different than you think it ought to be.? Note that the
opamp models are filled with B-sources and they are doing what
they ought to be in the .ac analysis.

> 2. Is there a better way to enter the equation so that it
> gets stored with the circuit diagram and doesn't have to be
> reentered every time the circuit is reloaded?

Make the waveform window the active window.? Use menu command
Plot Settings=>Save Plot Settings.? That will allow you to save
the plot settings with the expressions in .plt file that you can
reload for that or any other simulation.

--Mike

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!



To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


Do you Yahoo!?
- Now only $29.95 per month!


Re: Open Loop response for OpAmp

Steve Steckler
 

John,
?
I finally thought about you idea a little more. It really is not different than inserting a series voltage source. The problem with this approach is that there is often not a high impedance point. For example, at high frequencies, there are no "high" impedances. The "Middlebrook" method allows breaking the loop at any convenient point, and particularly when a high impedance point doesn't exist.
?
Steve


john_oztek wrote:
Steve,

As Mike pointed out, your 100 ohm load really isn't a high impedance,
so the current through it can't be ignored.? Since this situation is
usually the case in most practical circuits,? I always insert a unity
gain voltage controlled voltage source in front of the "high
impedance" node when running this sort of analysis.? I tried this
with your circuit and it reproduces your corrected plot except that
the phase is reversed.

Regards,
John




--- In LTspice@..., Steve Steckler wrote:
> Mike,
>?
> I don't want to push this too far since you may not be too
interested in this particular problem, but I'm attaching the results
of the open loop simulation of an opamp circuit using LTSPice. If you
believe what you see, the upper plot pane shows the corrected loop
gain, while the lower one shows the uncorrected one you get by just
taking the ratio of the voltages at both ends of the injected voltage
source.
>?
> As you can see, the two sets of gain and phase plots are
substantially different. Incidentally these results are similar to,
but not exactly the same, as those shown in
soft.com/news/spring97/loopgain.shtm. I usually remove the hacks and
change some other things when running this kind of simulation, which
I didn't do this time, but I believe the results show a trend. In a
previous simulation, when I made some of the setup changes, the
results matched the article more closely.
>?
> The differences between the two plots are greater than I would have
expected, so if one is interested in more accurate simulations of
open-loop gain, this approach seems to warrant its complexity.
>?
> I haven't done any careful comparisons by other methods at this
point, but I believe there is some truth to all of this! I didn't
create macros as the article did, but wrote an equation for the
corrected response.
>?
> It's just food for thought.
>?
> Regards,
>?
>??????????????? Steve
>?
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!



To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


Do you Yahoo!?
- Now only $29.95 per month!


Re: Open Loop response for OpAmp

Steve Steckler
 

Thanks John,
?
I'll take a look at your suggestion and report back!. If it works as you say, it sure's a lot simpler!
?
Steve

john_oztek wrote:
Steve,

As Mike pointed out, your 100 ohm load really isn't a high impedance,
so the current through it can't be ignored.? Since this situation is
usually the case in most practical circuits,? I always insert a unity
gain voltage controlled voltage source in front of the "high
impedance" node when running this sort of analysis.? I tried this
with your circuit and it reproduces your corrected plot except that
the phase is reversed.

Regards,
John




--- In LTspice@..., Steve Steckler wrote:
> Mike,
>?
> I don't want to push this too far since you may not be too
interested in this particular problem, but I'm attaching the results
of the open loop simulation of an opamp circuit using LTSPice. If you
believe what you see, the upper plot pane shows the corrected loop
gain, while the lower one shows the uncorrected one you get by just
taking the ratio of the voltages at both ends of the injected voltage
source.
>?
> As you can see, the two sets of gain and phase plots are
substantially different. Incidentally these results are similar to,
but not exactly the same, as those shown in
soft.com/news/spring97/loopgain.shtm. I usually remove the hacks and
change some other things when running this kind of simulation, which
I didn't do this time, but I believe the results show a trend. In a
previous simulation, when I made some of the setup changes, the
results matched the article more closely.
>?
> The differences between the two plots are greater than I would have
expected, so if one is interested in more accurate simulations of
open-loop gain, this approach seems to warrant its complexity.
>?
> I haven't done any careful comparisons by other methods at this
point, but I believe there is some truth to all of this! I didn't
create macros as the article did, but wrote an equation for the
corrected response.
>?
> It's just food for thought.
>?
> Regards,
>?
>??????????????? Steve
>?
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!



To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


Do you Yahoo!?
- Now only $29.95 per month!


Re: Open Loop response for OpAmp

chumpomatic2000
 

Dear Chaps,

Why not try my method - for simulators only

Version 4
SHEET 1 980 680
WIRE -352 112 -352 176
WIRE -352 176 -416 176
WIRE -352 176 -352 240
WIRE -416 176 -416 192
WIRE 160 144 32 144
WIRE 256 64 224 64
WIRE -32 64 -32 144
WIRE 272 -16 224 -16
WIRE 224 -16 224 64
WIRE 224 64 -32 64
WIRE 192 128 192 -16
WIRE 192 -16 -352 -16
WIRE -352 -16 -352 32
WIRE 192 192 192 352
WIRE 192 352 -352 352
WIRE -352 352 -352 320
WIRE -32 224 -32 256
WIRE 336 -16 384 -16
WIRE 384 -16 384 64
WIRE 384 64 336 64
WIRE 384 64 384 160
WIRE 384 160 224 160
WIRE 160 176 80 176
WIRE 32 144 -32 144
WIRE 416 160 384 160
WIRE 80 224 80 176
FLAG -416 192 0
FLAG -32 256 0
FLAG 80 304 0
FLAG 32 144 a
FLAG 80 176 b
FLAG 416 160 out
SYMBOL voltage -352 16 R0
SYMATTR InstName V1
SYMATTR Value 25
SYMBOL voltage -352 224 R0
SYMATTR InstName V2
SYMATTR Value 25
SYMBOL Opamps&#92;&#92;LT1001 192 96 R0
SYMATTR InstName U1
SYMBOL res 352 48 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R1
SYMATTR Value 1k
SYMBOL cap 336 -32 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C1
SYMATTR Value 3p
SYMBOL res -48 128 R0
SYMATTR InstName R2
SYMATTR Value 1k
SYMBOL voltage 80 208 R0
WINDOW 123 24 132 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value2 AC 1
SYMATTR InstName V3
SYMATTR Value 0
TEXT 280 304 Left 0 !.ac dec 100 1 1G
TEXT 280 352 Left 0 ;plot V(out)/V(b,a) for open loop gain
TEXT 280 384 Left 0 ;plot V(a)/V(b,a) for loop gain


Re: Open Loop response for OpAmp

 

Steve,

The concept seems to be that it many cases there really is no
perfect place to put the injected voltage source, so with this
method you don't have to worry about that.
That's correct, except that my own experience is that it rarely
comes up that I can't find an appropriate place to interject the
signal. This is similar to the case in real life where you can
break the feedback point to measure the open loop voltage gain.
That too must be done at a point where a low impedance point feeds
a high impedance one. Commercial instruments that measure open
loop response from the closed loops system usually also make the
approximation that I'm able to do in simulation.

By the way, on a related issue - I tried putting the relatively
complicated equation for the ecorrected loop response into a
behavioral model. First I tried just putting in the ratio of
the two voltages; It took the node voltages but would not do
the division of the two voltages. It just ignored the division.
I'm not sure whether the Bv block is capable of doing the math
functions; the brief information on Bv seems to indicate that it is.
The B-source is linearized in the .op and then acts as a linear
element just like any other SPICE element.

Therefore my two questions are:

1. Can I use a behavioral model to evaluate and save
an _expression such as this one?
You can for real data, but the complex data of a .ac analysis
is a small signal linear analysis and the behavior of the B-source
might be different than you think it ought to be. Note that the
opamp models are filled with B-sources and they are doing what
they ought to be in the .ac analysis.

2. Is there a better way to enter the equation so that it
gets stored with the circuit diagram and doesn't have to be
reentered every time the circuit is reloaded?
Make the waveform window the active window. Use menu command
Plot Settings=>Save Plot Settings. That will allow you to save
the plot settings with the expressions in .plt file that you can
reload for that or any other simulation.

--Mike

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


Re: Open Loop response for OpAmp

 

Steve,

As Mike pointed out, your 100 ohm load really isn't a high impedance,
so the current through it can't be ignored. Since this situation is
usually the case in most practical circuits, I always insert a unity
gain voltage controlled voltage source in front of the "high
impedance" node when running this sort of analysis. I tried this
with your circuit and it reproduces your corrected plot except that
the phase is reversed.

Regards,
John




--- In LTspice@..., Steve Steckler <leckerts@y...> wrote:
Mike,

I don't want to push this too far since you may not be too
interested in this particular problem, but I'm attaching the results
of the open loop simulation of an opamp circuit using LTSPice. If you
believe what you see, the upper plot pane shows the corrected loop
gain, while the lower one shows the uncorrected one you get by just
taking the ratio of the voltages at both ends of the injected voltage
source.

As you can see, the two sets of gain and phase plots are
substantially different. Incidentally these results are similar to,
but not exactly the same, as those shown in
soft.com/news/spring97/loopgain.shtm. I usually remove the hacks and
change some other things when running this kind of simulation, which
I didn't do this time, but I believe the results show a trend. In a
previous simulation, when I made some of the setup changes, the
results matched the article more closely.

The differences between the two plots are greater than I would have
expected, so if one is interested in more accurate simulations of
open-loop gain, this approach seems to warrant its complexity.

I haven't done any careful comparisons by other methods at this
point, but I believe there is some truth to all of this! I didn't
create macros as the article did, but wrote an equation for the
corrected response.

It's just food for thought.

Regards,

Steve





---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


Re: Open Loop response for OpAmp

Steve Steckler
 

Mike,
?
The concept seems to be that it many cases there really is no perfect place to put the injected voltage source, so with this method you don't have to worry about that. More than 3 points per decade sounds like a good idea.
?
By the way, on a related issue - I tried putting the relatively complicated equation for the ecorrected loop response into a behavioral model. First I tried just putting in the ratio of the two voltages; It took the node voltages but would not do the division of the two voltages. It just ignored the division. I'm not sure whether the Bv block is capable of doing the math functions; the?brief information on Bv seems to indicate that it is.
?
Therefore my two questions are:
?
1. Can I use a behavioral model to evaluate and save an expression such as this one?
?
2. Is there a?better way to enter the equation so that it gets stored with the circuit diagram and doesn't have to be reentered every time the circuit is reloaded?
?
Thanks,
????????? Steve


Panama Mike wrote:
To get good accuracy with just using a single floating
AC source and taking the ratio of voltages to either side,
the source needs to be placed in a section of the loop
where there is no current in the floating source.? That
is, in a section of the loop where the impedance goes from
low to high.? In your circuit, you've put it between the
opamp output and a 100 Ohm resistor.? You really can't
expect accurate results for that.? If you put the floating
source directly in front of the opamp you can get good
results well beyond unity gain, but even there eventually
the input capacitance driven by the feedback network will
introduce an error at some high enough frequency which
sometimes can effect your circuit's stability and the
correctness of the analysis.

BTW, you probably should use more than 3 points per decade.
LTspice linearly interpolates between the points in the
complex plane no matter how the data is represented on
the plot.? That's why the lines between data points are
curved, the straight line between data points in the complex
plane isn't a straight line on a Bode plot.

--Mike

--- Steve Steckler wrote:
> Mike,
>?
> I don't want to push this too far since you may not be too interested in this particular
> problem, but I'm attaching the results of the open loop simulation of an opamp circuit using
> LTSPice. If you believe what you see, the upper plot pane shows the corrected loop gain, while
> the lower one shows the uncorrected one you get by just taking the ratio of the voltages at both
> ends of the injected voltage source.
>?
> As you can see, the two sets of gain and phase plots are substantially different. Incidentally
> these results are similar to, but not exactly the same, as those shown in
> I usually remove the hacks and change
> some other things when running this kind of simulation, which I didn't do this time, but I
> believe the results show a trend. In a previous simulation, when I made some of the setup
> changes, the results matched the article more closely.
>?
> The differences between the two plots are greater than I would have expected, so if one is
> interested in more accurate simulations of open-loop gain, this approach seems to warrant its
> complexity.
>?
> I haven't done any careful comparisons by other methods at this point, but I believe there is
> some truth to all of this! I didn't create macros as the article did, but wrote an equation for
> the corrected response.
>?
> It's just food for thought.
>?
> Regards,
>?
>??????????????? Steve
>?
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!

> ATTACHMENT part 2 application/octet-stream name=fbop27.asc


> ATTACHMENT part 3 image/gif name=FBOP27.gif



__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!



To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to the .


Do you Yahoo!?
- Now only $29.95 per month!


Re: Open Loop response for OpAmp

 

To get good accuracy with just using a single floating
AC source and taking the ratio of voltages to either side,
the source needs to be placed in a section of the loop
where there is no current in the floating source. That
is, in a section of the loop where the impedance goes from
low to high. In your circuit, you've put it between the
opamp output and a 100 Ohm resistor. You really can't
expect accurate results for that. If you put the floating
source directly in front of the opamp you can get good
results well beyond unity gain, but even there eventually
the input capacitance driven by the feedback network will
introduce an error at some high enough frequency which
sometimes can effect your circuit's stability and the
correctness of the analysis.

BTW, you probably should use more than 3 points per decade.
LTspice linearly interpolates between the points in the
complex plane no matter how the data is represented on
the plot. That's why the lines between data points are
curved, the straight line between data points in the complex
plane isn't a straight line on a Bode plot.

--Mike

--- Steve Steckler <leckerts@...> wrote:
Mike,

I don't want to push this too far since you may not be too interested in this particular
problem, but I'm attaching the results of the open loop simulation of an opamp circuit using
LTSPice. If you believe what you see, the upper plot pane shows the corrected loop gain, while
the lower one shows the uncorrected one you get by just taking the ratio of the voltages at both
ends of the injected voltage source.

As you can see, the two sets of gain and phase plots are substantially different. Incidentally
these results are similar to, but not exactly the same, as those shown in
. I usually remove the hacks and change
some other things when running this kind of simulation, which I didn't do this time, but I
believe the results show a trend. In a previous simulation, when I made some of the setup
changes, the results matched the article more closely.

The differences between the two plots are greater than I would have expected, so if one is
interested in more accurate simulations of open-loop gain, this approach seems to warrant its
complexity.

I haven't done any careful comparisons by other methods at this point, but I believe there is
some truth to all of this! I didn't create macros as the article did, but wrote an equation for
the corrected response.

It's just food for thought.

Regards,

Steve





---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
ATTACHMENT part 2 application/octet-stream name=fbop27.asc

ATTACHMENT part 3 image/gif name=FBOP27.gif


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


Open Loop response for OpAmp

Steve Steckler
 

Mike,
?
I don't want to push this too far since you may not be too interested in this particular problem, but I'm attaching the results of the open loop simulation of an opamp circuit using LTSPice. If you believe what you see, the upper plot pane shows the corrected loop gain, while the lower one shows the uncorrected one you get by just taking the ratio of the voltages at both ends of the injected voltage source.
?
As?you can see, the two sets of gain and phase plots are substantially different. Incidentally these results are similar to, but not exactly the same, as?those shown in . I usually remove the hacks and change some other things when running this kind of simulation, which I didn't do this time, but I believe?the results?show a trend. In a previous simulation, when I made some of the setup changes, the results matched the article more closely.
?
The differences between the two plots are greater than I would have expected, so if one is interested in more accurate simulations of open-loop gain, this approach seems to warrant its complexity.
?
I haven't done any careful comparisons by other methods at this point, but I believe there is some truth to all of this! I didn't create macros as the article did, but wrote an equation for the corrected response.
?
It's just food for thought.
?
Regards,
?
?????????????? Steve
?


Do you Yahoo!?
- Now only $29.95 per month!


Re: Not even ... (lame parameter stepping)

 

Analog et la.,

Please update to version 2.03s that has just been made
available on our website. You should be able to just use
the menu command Tools=>Sync Release to update to this
version. Sorry for the inconvenience and thank you
again for the report.

Version 2.03s also features a new waveform math engine
that first uses an optimizing compiler to convert
the expression into intermediate code that is later
executed. Plot speed improvement starts at ~5x
for small data sets and increases as the size of the
.raw file increases. Let me know if you find any
bugs introduced there.

--Mike

--- Panama Mike <panamatex@...> wrote:
Oh, yes, now I see the problem. There was a problem introduced.
If you add the line ".param R=5K" the circuit will fail
but the line2 ".param" or ".param R=5K nix=3K" will not
cause it to fail. There be an update next week(we're on
vacation today and tomorrow) that will also accept the old
syntax.

Thanks for reporting the problem.

--Mike

--- analogspiceman <analogspiceman@...> wrote:
Panama Mike, analog wrote:

One of my favorite features is hobbled. :( :(
Mike, please make it whole again.

Version 2.03r June 30th.
I didn't know that it was broken. There was recent change
to make globally .step'ed parameters accessible in subcircuits
if not defined at a more local scope, so maybe something
else broke when I fixed that. Can you e-mail an example
that shows the problem? Here's a deck that would indicate
that parameter stepping works:

* example parameter stepping
V1 1 0 pulse(0 1 0 1u 1u .5m 1m)
R1 1 2 {R}
C1 2 0 .1u
.step param R list 1K 2K 3K
.tran 3m
.end
When param stepping suddenly went lame in circuit file at work where
it used to run like a champ, the first thing I did was to make up a
test circuit *almost* exactly like the working example you just
listed. And it didn't run.

The key difference seems to be that my file includes the following
additional spice command: ".param R=1k".

This seemingly unnecessary "double definition" was required in Pspice
syntax and never used to trip up LTspice. Seems like you might want
to maintain the Pspice compatibility. But whatever you do, I'm still
going to think LTspice is the greatest (lame jokes aside).



__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


Re: Negative Resistance

 

I get by fine with just inserting a floating voltage source in
the feedback and taking the ratio of complex voltages to either
side. I'm always able to find a point of low impedance to high
impedance in the loop to make that aspect the least of my
concerns, but yes, I'm aware it's possible to handle the fact
that the current through the inserted supply isn't zero
exactly.

The method is also useful for SMPS's. I use a floating SIN()
wave source in the feedback loop, and simulate it in the
time domain until it reaches steady state. Then I let it
run a few cycles of the injection frequency, do FFT's of
the waveforms to either side, and get the open loop response
from the ratio of those complex voltages. This is just doing
frequency response analsysis(Venable) in simulation.

BTW, in my eariler post "R(I(V1)) instead of R(I(V1))" should
have been "R(I(V1)) instead of I(V1)"

--Mike

--- Steve Steckler <leckerts@...> wrote:
Mike,

One of the simulators I looked at was CircuitMaker which apparently has it turned around. It
just emphasizes that tools are useful but you have to stay alert are you may get some
surprises.!

I have been playing with simulating loop gain while keeping the loop closed, and found one of
Middlebrook's papers about injecting both ac voltage and current. It's interesting that ISPICE
has created library components based on Middlebrook's ideas to make it easier to find loop gain.

I used to put an ac voltage source in series with the loop, but didn't realize for a long time
that you must also use current injection and then solve an equation to get the right answer. So
I tried it and am getting hung up on the current directions. Needless to say if you use the
wrong current directions you get the wrong answer.

If you're not aware of this technique, or If you ever get interested in this I can give you a
couple of references.

Steve

Panama Mike <panamatex@...> wrote:
Opps, looks like PSpice does follow the same
convention as LTspice for .ac analysis. I just
forgot to plot R(I(V1)) instead of R(I(V1)).

My mistake about saying PSpice didn't do this
right. But if you have a SPICE simulator that
doesn't follow this convention, that's broken
behavior.

--Mike

--- Panama Mike
wrote:
Steve,

The SPICE convention is that positive device current
is in the direction of into the device. For a voltage
source, that is in the direction into the positive
terminal and out the negative one. It's an unfortunate
choice, since it goes against common laboratory procedure.
But since these currents are called in behavioral sources,
the convention is now fixed. LTspice uses it consistently.
PSpice uses it consistently for real data(.tran, .op, .dc),
but plots it reversed for .ac analysis. It's a minor bug
in PSpice.

For resistor currents, I don't know of a convention. You
can turn the resistor around if you don't like the sign
that LTspice uses.

--Mike

--- Steve Steckler wrote:
It looks like some of the simulator programmers have adjusted the current in voltage soruces
so
the current is positive when it is supplying current to the circuit.

Panama Mike
wrote:Steve,

I've noticed that most SPICE simulators allow the insertion of negative
resistors and LTSpice seems to be no exception. However, when you do a
Bode plot with an AC Analysis, the Real part of the current is positive
and the Imaginary part of the current is zero. I have tried this with
other simulators and the Real part of the current is negative and the
imaginary part is zero...
.AC analysis plots default to a Bode plot which is a polar
representation. What you're calling the real part is the
magnitude, which is always positive. Since the phase is
-180, you have a complex number with a negative real
component with zero imaginary.

You can change the representation from Bode to Cartesian
by moving the mouse to the left of the left axis, left
clicking, and then selecting Cartesian instead of the
default Bode under representation.

--Mike


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!



To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to




---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!



To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!



To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to




---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


Re: Negative Resistance

 

No, it's the convention and can't be "fixed" if for no other
reason than libraries have models that are written in that
convention.

--Mike

--- Dale <dchishol@...> wrote:
--- In LTspice@..., Panama Mike <panamatex@y...> wrote:
Steve,

The SPICE convention is that positive device current
is in the direction of into the device. For a voltage
source, that is in the direction into the positive
terminal and out the negative one. It's an unfortunate
choice, since it goes against common laboratory procedure.
- - - <snip> - - -

The choice may indeed be contrary to common laboratory procedure, but
it ensures that when you multiply current times voltage for ANY 2-
terminal device (observing rules for signed arithmetic), the result
is positive for devices dissipating power and negative for devices
supplying power. Call this behavior "academic" or "theoretical"
or "impractical" or "unfortunate" if you wish, but please don't think
that changing it is an unquestionable improvement!

Dale


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!


Re: Negative Resistance

Dale
 

--- In LTspice@..., Panama Mike <panamatex@y...> wrote:
Steve,

The SPICE convention is that positive device current
is in the direction of into the device. For a voltage
source, that is in the direction into the positive
terminal and out the negative one. It's an unfortunate
choice, since it goes against common laboratory procedure.
- - - <snip> - - -

The choice may indeed be contrary to common laboratory procedure, but
it ensures that when you multiply current times voltage for ANY 2-
terminal device (observing rules for signed arithmetic), the result
is positive for devices dissipating power and negative for devices
supplying power. Call this behavior "academic" or "theoretical"
or "impractical" or "unfortunate" if you wish, but please don't think
that changing it is an unquestionable improvement!

Dale


Re: Negative Resistance

Steve Steckler
 

Mike,
?
One of the simulators I looked at was CircuitMaker which apparently has it turned around. It just emphasizes that tools are useful but you have to stay alert are you may get some surprises.!
?
I?have been?playing with simulating loop gain while keeping the loop closed, and found one of Middlebrook's papers about injecting both ac voltage and current. It's interesting that ISPICE has created library components based on Middlebrook's ideas to make it easier to find loop gain.
?
I used to put an ac voltage source in series with the loop, but didn't realize for a long time that you must also use current injection and then solve an equation to get the right answer. So I tried it and am getting hung up on the current directions. Needless to say if you use the wrong current directions you get the wrong answer.
?
If you're not aware of this technique, or If you ever get interested in this I can give you a couple of references.
?
Steve

Panama Mike wrote:
Opps, looks like PSpice does follow the same
convention as LTspice for .ac analysis. I just
forgot to plot R(I(V1)) instead of R(I(V1)).

My mistake about saying PSpice didn't do this
right. But if you have a SPICE simulator that
doesn't follow this convention, that's broken
behavior.

--Mike

--- Panama Mike wrote:
> Steve,
>
> The SPICE convention is that positive device current
> is in the direction of into the device. For a voltage
> source, that is in the direction into the positive
> terminal and out the negative one. It's an unfortunate
> choice, since it goes against common laboratory procedure.
> But since these currents are called in behavioral sources,
> the convention is now fixed. LTspice uses it consistently.
> PSpice uses it consistently for real data(.tran, .op, .dc),
> but plots it reversed for .ac analysis. It's a minor bug
> in PSpice.
>
> For resistor currents, I don't know of a convention. You
> can turn the resistor around if you don't like the sign
> that LTspice uses.
>
> --Mike
>
> --- Steve Steckler wrote:
> > It looks like some of the simulator programmers have adjusted the current in voltage soruces
> so
> > the current is positive when it is supplying current to the circuit.
> >
> > Panama Mike wrote:Steve,
> >
> > > I've noticed that most SPICE simulators allow the insertion of negative
> > > resistors and LTSpice seems to be no exception. However, when you do a
> > > Bode plot with an AC Analysis, the Real part of the current is positive
> > > and the Imaginary part of the current is zero. I have tried this with
> > > other simulators and the Real part of the current is negative and the
> > > imaginary part is zero...
> >
> > .AC analysis plots default to a Bode plot which is a polar
> > representation. What you're calling the real part is the
> > magnitude, which is always positive. Since the phase is
> > -180, you have a complex number with a negative real
> > component with zero imaginary.
> >
> > You can change the representation from Bode to Cartesian
> > by moving the mouse to the left of the left axis, left
> > clicking, and then selecting Cartesian instead of the
> > default Bode under representation.
> >
> > --Mike
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> >
> >
> > To unsubscribe from this group, send an email to:
> > LTspice-unsubscribe@...
> >
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
>
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
>
> To unsubscribe from this group, send an email to:
> LTspice-unsubscribe@...
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Save up to 80% on top-quality inkjet cartridges and get your order fast!
FREE shipping on orders $50 or more to the US & Canada. Shop at Myinks.com!
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/v2G7ND/KfUGAA/ySSFAA/bGYolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
LTspice-unsubscribe@...



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


Do you Yahoo!?
- Now only $29.95 per month!