Electronic – Measuring Resistance/Impedance with SPICE

spicetransistors

How does one measure impedance/resistance using SPICE? I have access to regular SPICE(MacSpice) and HSpice.

The DC current divider circuit at the bottom of this webpage seems to be one method. 0V DC sources are used, and the current through these zero volt sources is measured. Using the node voltage and the current measured, we can deduce resistance. Of course for circuits where we already know the resistance this is only good for measuring the current.

How can one do resistance/impedance measurements for AC circuits, such as the inputs or outputs of transistor amps (e.g. resistance looking into base, output at emitter, etc.)?

Best Answer

I know of two methods for impedance measurement. The first deals with DC impedance, and the second deals with AC impedance. They work regardless of whether you are looking at the input or output.

  1. Measuring input impedance: Apply a DC voltage source to the input of your circuit. If any output loading, power supplies, or additional biasing is required, include this in the schematic as well. Sweep the input DC voltage source over the voltage range you expect to use the circuit. Use the equation below to give you the input resistance. Note that it is very possible to not have a flat curve.

    R = 1/(Iin dI/dV)
    

    Explained, this is the inverse of the derivative of the input source's current w.r.t. the input voltage.

  2. Output impedance (or some other port): Apply the required bias voltages to the inputs to cause the device to be at its quiescent point. Apply a voltage source to the node you want to measure, and sweep the DC voltage over the range of expected node voltages. Calculate resistance in the same method as the first technique.

  3. AC Impedance: Superimpose a small (1 uV) sine wave on the port you want to measure. Measure the amplitude of the current, and the phase difference between the voltage and current waveform. This will give you a current phasor, which can then be used to solve for a value of Z. You may be able to do this with an AC simulation, but a transient simulation with different frequencies should give the result you are looking for.