Author Topic: .TF Spice Simulation, output impedance with current as output  (Read 6957 times)

0 Members and 1 Guest are viewing this topic.

Offline roym899Topic starter

  • Newbie
  • Posts: 4
  • Country: de
.TF Spice Simulation, output impedance with current as output
« on: December 20, 2015, 08:56:10 pm »
Hey guys,

I'm currently reading CMOS by R. Jacober Baker and in the first chapter there is a quick introduction into Spice but I have a hard time understanding one of its examples. Here is the circuit:

The calculated output impedance is infinity.

While I understand how the .TF statement calculates the output for a voltage as output I'm kinda irritated on how the output impedance for this kind of setup is calculated. In the book it says Vmeas is getting removed and the circuit is open, but I don't understand why Vmeas is getting removed for this calculation. And even if it's getting removed, the impedance looking into one of the pins of the removed Vmeas source would still be 3k because you can "reach" the other pin via the ground connection. (same thing would happen if I apply a voltage source to my output pins -> I'd get a current over gnd and so the output impedance defined by Ro=Vo/Io=3k)

I assume I have a wrong understanding of what the output pins or the desired output is in this case because my defined output is a current now instead of a voltage, but I'm not really sure how to handle this correctly.

So why is the output impedance in this case infinity?
Also how is "Vmeas is getting removed from the circuit" an explanation to this as I've also tried to put a third resistor in parallel with Vmeas which led to the same result?

Any help would be appreciated  :)
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11251
  • Country: us
    • Personal site
Re: .TF Spice Simulation, output impedance with current as output
« Reply #1 on: December 20, 2015, 09:12:09 pm »
It is not physically "removed". All ideal voltage sources have infinite impedance by definition. So they simply go away when you do the math.
Alex
 

Offline roym899Topic starter

  • Newbie
  • Posts: 4
  • Country: de
Re: .TF Spice Simulation, output impedance with current as output
« Reply #2 on: December 20, 2015, 09:34:50 pm »
Doesn't an ideal voltage source has zero impedance? While an ideal current source has infinite impedance?

I don't really see how this helps in this case.

As far as I know the normal way of obtaining the output resistance is to replace all voltage sources with a short and all current sources with an open circuit. So in theory it should be either 3k (if I remove Vmeas and replace Vin with a short) or 0 (if I keep Vmeas replacing it with a short).
« Last Edit: December 20, 2015, 09:40:27 pm by roym899 »
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: .TF Spice Simulation, output impedance with current as output
« Reply #3 on: December 20, 2015, 09:37:20 pm »
It is not physically "removed". All ideal voltage sources have infinite impedance by definition. So they simply go away when you do the math.

An ideal voltage source has zero impedance, an ideal current source has infinite impedance.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11251
  • Country: us
    • Personal site
Re: .TF Spice Simulation, output impedance with current as output
« Reply #4 on: December 20, 2015, 09:38:53 pm »
Yes, you are right. Then some more thinking is required.
Alex
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: .TF Spice Simulation, output impedance with current as output
« Reply #5 on: December 20, 2015, 09:52:14 pm »


I never used .tf, the LTspice help says this:

Quote
.TF -- Find the DC Small Signal Transfer Function

This is an analysis mode that finds the DC small signal transfer function of a node voltage or branch current due to small variations of an independent source.

Syntax: .TF V(<node>[, <ref>]) <source>
        .TF I(<voltage source>) <source>

So with V(xxx) and I(xxx) the measurement point is defined and <source> is an independent source to the measurement point.

Vmeas is a voltage source with zero impedance and zero voltage.

Now SPICE has this to say:
Transfer_function:    0.000333333    transfer
vin#Input_impedance:    3000    impedance
V(vmeas#Output_impedance):    1e+020    impedance


I think what SPICE is trying to tell us here is that the impedance of the Vmeas node toward external change by the specified independent source Vin is really, really large, infinity, since the voltage at this node is unable to change due to the zero impedance posed by Vmeas.
,
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11251
  • Country: us
    • Personal site
Re: .TF Spice Simulation, output impedance with current as output
« Reply #6 on: December 20, 2015, 09:53:53 pm »
Here is a document providing more information. http://www.cmosedu.com/videos/ltspice/CMOSedu_SPICE_Ch_1.pdf

I have not read through it yet, but it seem like there is an explanation there.

Well, it still says "Vmeas is removed from the circuit" with no explanation provided.
« Last Edit: December 20, 2015, 10:03:13 pm by ataradov »
Alex
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11251
  • Country: us
    • Personal site
Re: .TF Spice Simulation, output impedance with current as output
« Reply #7 on: December 20, 2015, 10:07:34 pm »
I think what SPICE is trying to tell us here is that the impedance of the Vmeas node toward external change by the specified independent source Vin is really, really large, infinity, since the voltage at this node is unable to change due to the zero impedance posed by Vmeas.
But what's the point of doing this in a first place? There is no new information gained from adding this bogus Vmeas source.
Alex
 

Offline roym899Topic starter

  • Newbie
  • Posts: 4
  • Country: de
Re: .TF Spice Simulation, output impedance with current as output
« Reply #8 on: December 20, 2015, 10:09:45 pm »
I think what SPICE is trying to tell us here is that the impedance of the Vmeas node toward external change by the specified independent source Vin is really, really large, infinity, since the voltage at this node is unable to change due to the zero impedance posed by Vmeas.
But what's the point of doing this in a first place? There is no new information gained from adding this bogus Vmeas source.
This voltage source is there to measure the current. Apparently it's the only way to measure current in a branch in spice.

@ dom0: Could you elaborate what you mean with "the impedance of the Vmeas node toward external change"? Not really sure what you mean by this.
« Last Edit: December 20, 2015, 10:11:55 pm by roym899 »
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: .TF Spice Simulation, output impedance with current as output
« Reply #9 on: December 20, 2015, 10:10:40 pm »
You didn't know "vin#Input_impedance:    3000    impedance". Well, assuming one cannot add 1000 and 3000.

Quote
@ dom0: Could you elaborate what you mean with "the impedance of the Vmeas node toward external change"? Not really sure what you mean by this.

Yes, very interesting. One would think "what current Vin needs to produce in order to change the voltage at the Vmeas node." So we would have lim Vmeas => 0 / lim I(Vin) => infty ~ 0 Ohms. I think due to .tf I(Vmeas) this might be reversed...?
The more I think about this the more unsure I am what the meaning of the SPICE output actually is supposed to mean.
« Last Edit: December 20, 2015, 10:17:45 pm by dom0 »
,
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11251
  • Country: us
    • Personal site
Re: .TF Spice Simulation, output impedance with current as output
« Reply #10 on: December 20, 2015, 10:13:55 pm »
This voltage source is there to measure the current. Apparently it's the only way to measure current in a branch in spice.
Not really. If you take the same exact schematic, but replace Vmeas with a short, the current in that branch will be I(R2) and numerically it will match the result with Vmeas (333.3 uA).
Alex
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11251
  • Country: us
    • Personal site
Re: .TF Spice Simulation, output impedance with current as output
« Reply #11 on: December 20, 2015, 10:16:23 pm »
You didn't know "vin#Input_impedance:    3000    impedance".
But we did. Here is a quote for non-modified schematic from the article above:
Quote
transfer_function = 6.666667e-01
output_impedance_at_v(vout,0) = 6.666667e+02
vin#input_impedance = 3.000000e+03
Alex
 

Offline roym899Topic starter

  • Newbie
  • Posts: 4
  • Country: de
Re: .TF Spice Simulation, output impedance with current as output
« Reply #12 on: December 20, 2015, 10:36:50 pm »
This voltage source is there to measure the current. Apparently it's the only way to measure current in a branch in spice.
Not really. If you take the same exact schematic, but replace Vmeas with a short, the current in that branch will be I(R2) and numerically it will match the result with Vmeas (333.3 uA).
Well atleast the syntax of .TF only allows the way it's done in the example though.
Quote
.TF I(<voltage source>) <source>
If you use .TF with I(R2) the transfer function equals 0 which probably is not what you would want.

And for the unedited circuit you posted: the difference was that in this 1st circuit you were interested in the output voltage V(Vout,0). In this case all the output seems very reasonable to me. As it's the same as you would get using the standard method for redeeming the input/output resistance.


You didn't know "vin#Input_impedance:    3000    impedance". Well, assuming one cannot add 1000 and 3000.

Quote
@ dom0: Could you elaborate what you mean with "the impedance of the Vmeas node toward external change"? Not really sure what you mean by this.

Yes, very interesting. One would think "what current Vin needs to produce in order to change the voltage at the Vmeas node." So we would have lim Vmeas => 0 / lim I(Vin) => infty ~ 0 Ohms. I think due to .tf I(Vmeas) this might be reversed...?
The more I think about this the more unsure I am what the meaning of the SPICE output actually is supposed to mean.
Thanks. But to be honest it's still not very clear. I see what you say with that the output voltage will always be zero so the input can/must change infinitly.
I still wonder though if this is really the definition of the output resistance. I thought it's more like what you would put in a thevenin/norton circuit to get the same behavior looking into the circuit from the output nodes. (atleast this is apparently what it does if you use a voltage as output) Apparently it's not so easy when you define a current as output.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf