Connect with us

LTspice Question

Discussion in 'Electronic Design' started by amdx, Feb 20, 2007.

Scroll to continue with content
  1. amdx

    amdx Guest

    Is it possible to graph R and X of a circuit?
    Such as looking into a filter, instead of amplitude
    and phase, could I graph R and X.
    If yes, how?

    Thanks, Mike
  2. Ken Smith

    Ken Smith Guest

    Get the plot showing amplitude and phase.

    Bring the cursor over the lets say V(n002) at the top of the plot

    Right click and change what is plotted.

    re(v(n002)) plots the in phase part of a voltage
    im(v(n002)) plots the quaderature part.

    To get both, you need to get the raw signal displayed again and edit the
    second one.

    Next you double (left) click the scale down the right side and tell it not
    to plot phase.
  3. amdx

    amdx Guest

    Hi Ken,
    I don't quite have it,
    I'm plotting (v(in)) which is the voltage out of the signal generator
    (with internal resistance) feeding a filter. The plot shows voltage
    and phase. If I right click and change (v(in)) to re(v(in)) then I still
    need to do
    something with im(v(in)). I either have improper syntax or I'm putting it in
    wrong place.
    If I get it right, what is the label on the left y axis? It seems to be
    voltage I was
    looking for ohms.
    Maybe I need to plot something different from the start?
    Thanks for working me through this,
  4. Tom Bruhns

    Tom Bruhns Guest

    Yes... OK, there are many ways you could do this. Here's just one.

    I'm assuming you will do an AC analysis, to get the response versus
    frequency. Excite the circuit with a current source, say I1. It's
    convenient to set it to AC 1 amp, zero phase, but not necessary. Have
    that current flowing INTO the circuit. Then the voltage at the input
    divided by the current will be a complex quantity equal to the net
    impedance. If you made the current = 1A, you don't even have to
    divide by it, but there's an advantage to do so... The real part of
    that will be resistance, and the imaginary part will be reactance.
    Let's say you labeled the input node "in" Then to start, plot V(in).
    The default is a dB plot. Now right-click on the label at the top. A
    box will come up; change the plotted quantity to re(V(in)/I(I1)), and
    "ok" that. Now put your cursor over the plot, and right click.
    Select "manual limits". Set the left vertical axis to linear. You
    should now have a plot of the real part of the input impedance,
    displayed in ohms. But wait! If you change the plotted quantity back
    to just V(in)/I(I1), it will plot the real part (resistance) on the
    left axis, and the imaginary part (reactance) on the right axis.

    Dat help any?

  5. amdx

    amdx Guest

    Thanks Tom,
    That info got me almost all the way there.
    The last step, has no effect.
    For the last step I did as follows, Right click on the label at the top,
    changed (V(in)/I(I1)) to V(in)/I(I1) "hmm" (is that correct?) and then
    click run, nothing changes.
    The curves don't change, I don't get ohms on the right side.
    What did I miss?
    Thanks again, Mike
  6. qrk

    qrk Guest

    Left double-click on the Y-axis numbers on the graph. The
    "Representation" selecto box that shows Bode, change that to
    Cartesian. You will see your results in real an imaginary components.
    You can get you plot to display |Z| and phase if you select Linear for
    the Bode plot.
  7. Tom Bruhns

    Tom Bruhns Guest

    Notice that what I said to plot at first was re(V(in)/I(I1)). That
    plots just the resistance; the dashed line, corresponding to the right
    vertical axis, is zero. Drop the "re" part (and the parens if you
    wish) and you display the resistance on the left axis, with the solid
    line, and the reactance on the right, with the dashed line. Cool
    thing is that the units are displayed as ohms; it knows that voltage
    divided by current is ohms. And there's an "i" in the label for the
    reactance, as there should be.

  8. Ken Smith

    Ken Smith Guest

    Stop at this point and admire the trace.

    Now click on the same node again.

    Look at the two traces. You now have the "re(V(in))" and just "V(in)" in
    the top of the graph.

    Now, move the mouse over the "V(in)" label at the top of the graph. Click
    and edit like you did before.

    You missed a step.
    You will only be able to plot voltages or currents. If you force a
    current of 1A through an impedance, you get a voltage equal to that
    impedance so this is how you can get impedances to plot.

    Z = V/I

    If you want you can use 1mA instead and divide by the 1mA. You could use
    the 1uA or 1pA or 1fA or 1aA or ......
  9. Tom Bruhns

    Tom Bruhns Guest

    Not true! If you plot V(in)/I(source) -- that is, a function which is
    a voltage divided by a current -- it will display in ohms, complete
    with the Omega symbol. That way, you can use any current you want
    (not that it makes a difference for an AC analysis, which is taken to
    be linear around an operating point -- but it's nice for transient
    analyses), and properly display the result in ohms. This works for
    quite a few other units, too: volts*current is power, etc.

  10. amdx

    amdx Guest

    Thanks guys,
    I got the graph that I was looking for, Real ohms on the left ( solid
    imaginary ohms on right (dotted line).
    At this point I got as far as I could with Tom's info then used qrk's
    change to finish the graph.
    I'll reread Tom's third post and see where I went wrong.
    Thanks for all the help,
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day