Input Impedance plot using Spice

Jun 04, 2006 3 Replies

Hi,



I am starting to learn Spice, specifically for simulating some amateur radio circuits. I am using ngspice, a version of the original Berkeley Spice. I have a very silly doubt, sorry for my ignorance.



I have simulated a lowpass LC filter. The netlist is given below:


*============== Begin SPICE netlist of main design ============ R101 0 n3 50 C102 0 n3 330pF C101 0 n2 820pF L102 n2 n3 1.3uH L101 1 n2 1.3uH R102 2 1 50 V101 2 0 AC C103 0 1 330pF .END

I would like to plot the input impedance Vs frequency of this filter using spice. How do I do that?



Thanks Regards Ramakrishnan



I solved it by a crude method : by adding a 1 ohm resistor in the input and plotting the soltage across it (which will also be the current, as R = 1 ohm) and using nutmeg commands real and imag. The new netlist is:

  • gnetlist -g spice-sdb -o norcal40A-harmonic-filter.net norcal40A-harmonic-filter.sch
*********************************************************
  • Spice file generated by gnetlist *
  • spice-sdb version 12.27.2005 by SDB -- *
  • provides advanced spice netlisting capability. *
  • Documentation at
    formatting link
    *
********************************************************* *============== Begin SPICE netlist of main design ============ R101 0 n3 50 C102 0 n3 330pF C101 0 n2 820pF L102 n2 n3 1.3uH L101 v2 n2 1.3uH R103 1 v1 49 V101 1 0 AC R102 v1 v2 1 C103 0 v2 330pF .END

In the ngspice prompt:

let Rin = real((v1)/(v1-v2)) let Iin = imag((v1)/(v1-v2)) plot Rin plot Iin

This plots the real and imag part of input impedance.

Is there a better, direct method to find the input impedance?

73 Ramakrishnan, VU3RDD

rkrishnan wrote:

Use an ideal 1A current source to ground as the drive signal. The voltage at the non ground lead is then equal to the input impedance.

Kevin Aylward snipped-for-privacy@anasoft.co.uk

formatting link
SuperSpice, a very affordable Mixed-Mode Windows Simulator with Schematic Capture, Waveform Display, FFT's and Filter Design.

"There are none more ignorant and useless,than they that seek answers on their knees, with their eyes closed"

Kevin,

Thanks a lot. WIll try that.

Ramakrishnan

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required