I need to build a bode plot that would show impedance curve of a simplest circuit for a frequency range of 0 to 20kHz. Apparently the x axis should be frequency, y axis should be impedance. I'd like to build one plot for impedance value and another for the phase. I'm using LTSpice IV at the moment.
What is Impedance ? As far as I know: Z = V/I
So if you fix I = 1 (Current source with AC = 1) and plot the voltage you plot V / 1 = ... ?
Aha V / 1 = V = Z !
This is how I simulate and plot the impedance over frequency of some DUT:
The magnitude will be the impedance The phase you can also plot directly.
If this puzzles you: Imagine in the box there is only a 1 ohm resistor. What would the plot be ?
Now a 10 ohms resistor...
Now a capacitor...
The impedance between two points in a circuit is defined as the complex voltage-to-current ratio (voltage between the two points and current through the connecting part). After performing an ac analysis it shouldn`t be a problem to display (a) the magnitude of this ratio in dB and (b) the phase difference of this ratio (between those two points).
Simplification: Because there is no phase shift - as far as the current is concerned - between the two points defining the impedance, you simply can use the phase difference of both node voltages.