.TF Spice Simulation, output impedance with current as output - Page 1
Forum section: electronics / beginners

author: roym899
author_rank: Newbie
timestamp: December 20, 2015, 08:56:10 pm
content: 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

author: ataradov
author_rank: Super Contributor
timestamp: December 20, 2015, 09:12:09 pm
content: It is not physically "removed". All ideal voltage sources have infinite impedance by definition. So they simply go away when you do the math.

author: roym899
author_rank: Newbie
timestamp: December 20, 2015, 09:34:50 pm
content: 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).

author: mikerj
author_rank: Super Contributor
timestamp: December 20, 2015, 09:37:20 pm
content: Quote from: ataradov on December 20, 2015, 09:12:09 pmAn ideal voltage source has zero impedance, an ideal current source has infinite impedance.

author: ataradov
author_rank: Super Contributor
timestamp: December 20, 2015, 09:38:53 pm
content: Yes, you are right. Then some more thinking is required.

author: dom0
author_rank: Super Contributor
timestamp: December 20, 2015, 09:52:14 pm
content: Quote from: roym899 on December 20, 2015, 08:56:10 pmI never used .tf, the LTspice help says this:QuoteSo 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 transfervin#Input_impedance: 3000 impedanceV(vmeas#Output_impedance): 1e+020 impedanceI 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.

author: ataradov
author_rank: Super Contributor
timestamp: December 20, 2015, 09:53:53 pm
content: Here is a document providing more information.http://www.cmosedu.com/videos/ltspice/CMOSedu_SPICE_Ch_1.pdfI 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.

author: ataradov
author_rank: Super Contributor
timestamp: December 20, 2015, 10:07:34 pm
content: Quote from: dom0 on December 20, 2015, 09:52:14 pmBut what's the point of doing this in a first place? There is no new information gained from adding this bogus Vmeas source.

author: roym899
author_rank: Newbie
timestamp: December 20, 2015, 10:09:45 pm
content: Quote from: ataradov on December 20, 2015, 10:07:34 pmThis 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.

author: dom0
author_rank: Super Contributor
timestamp: December 20, 2015, 10:10:40 pm
content: You didn't know "vin#Input_impedance: 3000 impedance". Well, assuming one cannot add 1000 and 3000.QuoteYes, 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 .tfI(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.

author: ataradov
author_rank: Super Contributor
timestamp: December 20, 2015, 10:13:55 pm
content: Quote from: roym899 on December 20, 2015, 10:09:45 pmNot 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).

author: ataradov
author_rank: Super Contributor
timestamp: December 20, 2015, 10:16:23 pm
content: Quote from: dom0 on December 20, 2015, 10:10:40 pmBut we did. Here is a quote for non-modified schematic from the article above:Quote

author: roym899
author_rank: Newbie
timestamp: December 20, 2015, 10:36:50 pm
content: Quote from: ataradov on December 20, 2015, 10:13:55 pmWell atleast the syntax of .TF only allows the way it's done in the example though.QuoteIf 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.Quote from: dom0 on December 20, 2015, 10:10:40 pmThanks. 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.