¿ªÔÆÌåÓý

Date

Re: Question on loop gain and phase simulation

 

Hi.
Another approach. All local feedbacks are preserved, and the overall negative relationship is almost eliminated. Operating points are unchanged.
See Measuring loop gain AB.zip in TEMP folder.
?
Bordodynov.


06.12.2018, 15:15, "tony@... [LTspice]" <ltspice@...>:

?

Alan Revera wrote:

"Hi Andy, but the two circuits are identical other than I insert the AC source at different points in the feedback path. This is a linear circuit, I should get the same result when measure across the AC source."

Why do you say that? Here's a thought experiment - it's so simple you don't need to simulate it (but you can if you want).

Consider a very simple circuit comprising 2 equal resistors and a 1V voltage source, all in series forming a loop. Now ground the point between the two resistors.

What is V(+)/V(-)?? (where + and - are the nodes at each side of the source).

Clearly, the answer is 1, because you are comparing the voltage across two equal resistors carrying the same current (there is a phase difference of 180¡ã too, but that doesn't matter in this case).

Now, ground the (-) node instead. V(+)/V(-) now equals infinity because V(+)=1 and V(-)=0. But this is a linear circuit, too, and you have not changed the current that's flowing!

The point is that the expression does not mean the same thing in both circuits. Now in your circuits, measuring V(+)/V(-) gives different answers too, because the expression means something different in each case, and strictly in neither case does it actually tell you what the open loop gain is (which is probably not what you think it should be).

For a robust method of plotting open loop gain, you should study "Loopgain2.asc" in the LTspice/Examples folder bundled with the installation. This method also? accounts for impedances and current gain when evaluating the loop gain. Other "methods" may give about the right answer under particular conditions, but can easily go wrong when not used properly, as in your case.

Regards,
Tony


Re: how to measure supply currents in this example - TL072

 

On 12/6/18 2:08 AM, Christoph Kukulies kuku@... [LTspice] wrote:

This worked. But I¡¯m wondering about 10mA flowing into the supply of
that TL072 opamp. Per datasheet that should be Iq=1.4mA/channel.
When I exchange it against a, say, MC1458 , I¡¯m getting 1.7mA supply
current.
It depends on the model. The TL072 in the files area here that has
supply currents just adds a couple of voltage dependent current sources
(G***) on the supply pins that depend on the output voltage. It is not
modeling the internal behavior of the opamp.

Which is pretty typical of these models. They are attempting to provide
something that behaves like an opamp to the outside world. They do not
include simulations of the differential pair, current
sources/sinks/current mirrors, voltage gain stages, output stages, etc.
inside the opamp. If you want that, you will have to create it.


--
David W. Schultz


Re: Failure at "Edit Simulation Command"

 

Here is how I "deal" with this madness.

I put all the possible simulation lines in a single group of lines. I comment out, using the semicolon or asterisk, the ones I don't need for the present simulation.? When I right mouse click on the block of simulation commands I immediately press the ESC key (Windows) and the unhelpful simulation dialog goes away and I have a simple text edit box.? Then I can comment out one and uncomment another and press enter.? This seems to always work.

The simulation dialog box is broken on many levels.? Many times I change something in that box and say OK but my changes are lost.? IMO I don't see how Mike can use this dialog in everyday work and like it.? He should publish is work flow that he uses so we can all learn how it is "supposed" to work.

Dan


Re: how to measure supply currents in this example - TL072

 

¿ªÔÆÌåÓý

Ok, sorry for that. Will upload more complete in the future.?

Christoph?

Am 06.12.2018 um 11:24 schrieb tony@... [LTspice] <LTspice@...>:

?

Christoph wrote:

"In the vein of experimenting with different opamps I¡¯m trying now out the MC33078, which I also found on this groups¡¯ file area.

I uploaded my circuit:?"

If you want help debugging your circuits, you should at least upload everything needed for the simulation to run. When I try to open your schematic, it complains there is no TL072-R symbol. OK, I found it in Files > Temp. It is still impossible to run your schematic because the model file references TL072-R.sub, which you also haven't uploaded.

Changing the value parameter of the TL072-R symbol to MC33078 just confuses things, because that doesn't affect the model file it is looking for, only the model name. If you want us to run the simulation with the MC33078, you need to supply that model too, even if it is somewhere on the group website. Put everything you use into a zip file and upload that. Then we can all try the same thing.

Regards,
Tony


Re: Question on loop gain and phase simulation

 

Alan Revera wrote:

"Hi Andy, but the two circuits are identical other than I insert the AC source at different points in the feedback path. This is a linear circuit, I should get the same result when measure across the AC source."

Why do you say that? Here's a thought experiment - it's so simple you don't need to simulate it (but you can if you want).

Consider a very simple circuit comprising 2 equal resistors and a 1V voltage source, all in series forming a loop. Now ground the point between the two resistors.

What is V(+)/V(-)?? (where + and - are the nodes at each side of the source).

Clearly, the answer is 1, because you are comparing the voltage across two equal resistors carrying the same current (there is a phase difference of 180¡ã too, but that doesn't matter in this case).

Now, ground the (-) node instead. V(+)/V(-) now equals infinity because V(+)=1 and V(-)=0. But this is a linear circuit, too, and you have not changed the current that's flowing!

The point is that the expression does not mean the same thing in both circuits. Now in your circuits, measuring V(+)/V(-) gives different answers too, because the expression means something different in each case, and strictly in neither case does it actually tell you what the open loop gain is (which is probably not what you think it should be).

For a robust method of plotting open loop gain, you should study "Loopgain2.asc" in the LTspice/Examples folder bundled with the installation. This method also? accounts for impedances and current gain when evaluating the loop gain. Other "methods" may give about the right answer under particular conditions, but can easily go wrong when not used properly, as in your case.

Regards,
Tony


Re: Question on loop gain and phase simulation

 

Ala, you DO get the same results when you probe the SAME points in the circuit.? But you are not probing the same points in the circuit.

If you probe the differential voltage across the AC source, THAT value won't change.

But if you probe the voltages on opposide ends of the AC source, and plot the ratio of their voltages, and then move the AC source to another location, then the results will NOT be the same.? This has nothing to do with linearily.? You are physically moving the probe points to somewhere else in the circuit, and expecting the results to be the same.? That's just not possible.

What if the AC source is moved to a point where one of its pins is a virtual ground, and that pin's voltage is in the numerator?? What if the AC source then moves to the other side of the virtual ground so that the other pin is at virtual ground, and it is now the denominator?? There's a huge difference in the results, because you moved the probe points in the circuit.

Regards,
Andy



Re: Current drive circuit design

 

Thought it would be a fun look; should have known better. That was a mess. I thought I'd take a look to see how it was implemented, but with scattered bits of disconnected wires, comments, dot commands, and models (and a missing .lib file) on a huge canvas and with no apparent organisation, it's just not worth it.


Re: Failure at "Edit Simulation Command"

 

reinhold.pieper, the thing I don't like about what LTspice XVII does with this window, is that it remembers the settings from the last Simulation Command you edited.? So if you change from .TRAN to .DC or .AC, they don't make sense and you have to change all the boxes.

I (and I think most of us) liked the way it was before.? But we are stuck with this new behavior -- unless enough people can convince Mike to change it.? If I remember right, he was already asked about it.? He pointed out that something was actually wrong before, and HE likes the way it works now.

Regards,
Andy


@ [LTspice] <LTspice@...> wrote:



"Yes.? The behavior changed in LTspice XVII."

Hello, Andy, do you see the same behavior as me? That the mask doesn't work properly? Or is it just a problem with my installation?

Regards Reinhold



Re: Failure at "Edit Simulation Command"

 

Hello,

The behavior of the "Edit simulation" window has changed form LTspiceIV to LTspiceXVII.

Let's assume you have the following simulation command in the schematic.
.tran 0 50u 0 50n
Now do a right-mouse-click on it to get the edit-window for this command.

LTspiceIV
The edit window starts in the TRAN-tab. You switch to AC and enter the parameters for AC. You can go back to TRAN and the oroginal values are still there.

LTspiceXVII
The edit window starts is in the TRAN-tab. You switch to AC. The paramters from .TRAN are useless moved into the AC-tab. After you corrected/entered the parameters in AC, the settings in .TRAN are destroyed.

The "bad" behavior of LTspiceXVII is intended by design. We asked the designer a few times in the past to implement it as in LTspiceIV but without success.

Best regards,
Helmut


Re: Question on loop gain and phase simulation

 

Hi Andy, but the two circuits are identical other than I insert the AC source at different points in the feedback path. This is a linear circuit, I should get the same result when measure across the AC source.

Thanks


Re: how to measure supply currents in this example - TL072

 

I just spotted this -- Christoph wrote, "But I¡¯m wondering about 10mA flowing into the supply of that TL072 opamp."

FYI --? Actually it's 14mA, not 10mA.? You applied too much rounding and you lost a significant digit.

That's what makes it so suspicious.? 14mA vs. 1.4mA.? As if the person who created the model put a decimal point in the wrong place.

(Or maybe it could be related to the unbalanced supply voltages.)

Andy



Re: Failure at "Edit Simulation Command"

 

"Yes.? The behavior changed in LTspice XVII."

Hello, Andy, do you see the same behavior as me? That the mask doesn't work properly? Or is it just a problem with my installation?

Regards Reinhold


Re: Question on loop gain and phase simulation

 

Sorry, what I meant to say was, "If you are probing anything in one circuit that isn't the same in the other circuit, you will get different answers."

Of course you could probe something else, not the signals I looked at, as long as it's the same "something else" in both circuits.

Andy



Re: Failure at "Edit Simulation Command"

 

? ? "But earlier (version. IV) the input mask worked without problems."

Technically there were problems with it in LTspice III and IV.? But not this problem; it handled this pretty well.

Yes.? The behavior changed in LTspice XVII.

Regards,
Andy



Re: Question on loop gain and phase simulation

 

Alan, apparently you missed the point I made about probing the same or different points in a circuit.

The two circuits look to me like they have the same value of gain, when gain is defined as V(output) / V(inverting input pin).

In the left circuit, that value is probed as V(Out1)/V(N010).? In the right circuit, that value is V(Out2)/V(C).

If you are probing anything else, you will get different answers.? If the points you are probing on the two circuits are not in the same places, then the results (the amount of gain) will differ also.

V(out1)/V(a) and V(b)/V(c) look at very different points in their respective circuits.? Therefore there is no reason to think that the answers would be even similar, and they aren't.? (That would be like comparing voltage gain with input impedance.? You know they're not the same.)

The fact that the points are in series with the same feedback resistor is not sufficient.? Yes you can swap the resistor with the voltage source and the **circuit** should behave exactly the same; but the points probed need to stay in the same place in both circuits too -- meaning, the same place relative to the whole circuit, not relative to one element in the circuit which is allowed to move around.

If the thing you want to plot looks right to you when you plot V(Out1)/V(A), then you have to find a way of replicating those points IN THE SAME PLACES in the right-hand circuit too.? I don't think that's possible.

Regards,
Andy



Re: Failure at "Edit Simulation Command"

 

"When the simulation command begins with a semicolon (";"), then it is a Comment = ignored.? Therefore, attempting to edit it will show no data.? That's how it is supposed to be.

Save it with a dot (period) instead of a semicolon.

Andy"

Yeah, you're right. I know the different functions of "." and ";"? But earlier (version. IV) the input mask worked without problems.


Re: Failure at "Edit Simulation Command"

 

reinhold.pieper wrote:

? ? "Yeah, you're right. ..."

Who is right?

Right about what?

Andy



Re: how to measure supply currents in this example - TL072

 

¿ªÔÆÌåÓý

Please look at what I wrote about TL072 models not working with the negative supply grounded. You have to ground the 'half supply' voltage point.

Best wishes
John Woodgate OOO-Own Opinions Only
J M Woodgate and Associates 
Rayleigh, Essex UK
On 2018-12-06 10:11, Andy ai.egrps@... [LTspice] wrote:

?
Christoph wrote:

? ? "how do I change the symbol of my current TL072 from TL072-R to ?opamp2¡° ..."

Delete it and insert the new symbol.? (There may be tricks to do it by directly editing the .ASC file in a text editor, assuming that the TL072-R.asy was directly derived from opamp2.asy without changing anything substantial.? But I don't recommend it.? Better to actually swap symbols, then edit the new one to have "TL072".)

? ? "But I¡¯m wondering about 10mA flowing into the supply of that TL072 opamp. Per datasheet that should be Iq=1.4mA/channel."

This makes it sound as if the model you used had a stupid mistake, off by a factor of 10.? If you are familiar with SPICE Netlist syntax, you can trace out their subcircuit model.? I see there is a 2143 ohm resistor ("RP") connected directly between the Vcc and Vee supply pins in the model, but that only partly explains where the current goes.

You can even probe currents inside the TL072 subcircuit, if you enable saving subcircuit currents (LTspice Control Panel > Save Defaults > Save Subcircuit Node Voltages & Save Subcircuit Device Currents)..? After running a simulation, then right-click in the waveform window and choose Add Traces.? It lists every thing you can plot.? It's confusing at first, but you can figure it out.

Regards,
Andy



Re: how to measure supply currents in this example - TL072

 

Christoph wrote:

? ? "a) I¡¯m wondering why I¡¯m getting ?This Component cannot be edited¡° while this does not occur when I right click on the opamp in the?
? ? ?file MC33078_ST_test.asc (which is also in the lib.zip file)."

You didn't upload a .ZIP file, so I can't replicate it.? In the file you uploaded ("mc33078mp.asc"), that message doesn't happen.

That message happens when a symbol file has certain "attributes".? It's not an error.? It's a feature, designed that way to prevent changes to the symbol on a schematic.

I also can't run this new simulation.

The schematic you uploaded uses your TL072-R.asy symbols, and as it happens, those symbol files have the attribute ModelFile = TL072-R.sub.? The file TL072-R.sub doesn't exist.? So it can't be run.

I edited the schematic to use the "opamp2" symbol instead, and changed their names to "MC33078".? This schematic can't be run either, because there is no MC33078 model.? Did you have a MC33078 model in a separate file?? There is nothing on this new schematic that loads a MC33078 model.

You said your schematic had these errors:

? ??"Error on line 806 : e:u1:1 u1:50 u1:40 u1:51 0?:0? 1 e2 40 39 52 0 1
? ? ? Unknown parameter "e2"
? ? ?Error on line 806 : e:u2:1 u2:50 u2:40 u2:51 0?:0? 1 e2 40 39 52 0 1
? ? ?Unknown parameter "e2""

It's not clear what is going on there, but it looks like a possible mistake in those models.? Maybe they did something that was very unique to (say) PSPICE, or HSPICE, but not generic SPICE.? But we can't see those models.

? ? "Could it be that the opamp model doesn¡¯t allow for this unsymmetrical power supply connection ?"

It could be.

You could do an experiment where you use the op-amp model with symmetrical supplies, and two asymmetrical supplies (one negative, the other positive).

Regards,
Andy



Re: how to measure supply currents in this example - TL072

 

Christoph wrote:

"In the vein of experimenting with different opamps I¡¯m trying now out the MC33078, which I also found on this groups¡¯ file area.

I uploaded my circuit:?"

If you want help debugging your circuits, you should at least upload everything needed for the simulation to run. When I try to open your schematic, it complains there is no TL072-R symbol. OK, I found it in Files > Temp. It is still impossible to run your schematic because the model file references TL072-R.sub, which you also haven't uploaded.

Changing the value parameter of the TL072-R symbol to MC33078 just confuses things, because that doesn't affect the model file it is looking for, only the model name. If you want us to run the simulation with the MC33078, you need to supply that model too, even if it is somewhere on the group website. Put everything you use into a zip file and upload that. Then we can all try the same thing.

Regards,
Tony