# Finding variation in input impedance by varying a resistance using LTspice

I am trying to find the input impedance $$\R_{in}\$$ for the circuit given below using a 1 kHz sinusoidal source.

I want to plot the input impedance on the y-axis and the parameter $$\R_{2}\$$ on the x-axis.

However, when I run the simulation I get a set of graphs corresponding to different values of $$\R_{2}\$$ with time on the x-axis.

How can I get the graph for variation of input impedance with respect to $$\R_{2}\$$?

• You need to use AC analysis instead of a transient. Set Vin for AC analysis at 1V – G36 Feb 23 at 13:52
• @G36 I did do an ac analysis from 1khz to 2khz , but still i have got frequency on the x-axis and a complicated plot – Starboy Feb 23 at 14:11
• Do you know that R2 not only has an influence on the input resistance but also changes the transistor DC operational point? Also, you can reduce the number of steps (R2 values). Do you really need that many steps? Also, you can change the x-axis and plot Rin on it. – G36 Feb 23 at 14:24

Let's start by clarifying some things:

• Impedance is a frequency-dependent quantity. Therefore, as well as other transfer functions, it is characterized by phase and magnitude.
• LTspice perform a small signal ac analysis. This means that the result of this simulation only makes sense if the AC perturbation is small respect to DC operating point, so take care of this.

However, I assume you are interested only in impedance magnitude at the fixed frequency of 1KHz in function of parameter {r}. It's not a common thing in LT spice analysis but I got what you are looking for.

2. Right click on voltage source / small signal AC analysis / set the ac amplitude
3. Simulate/Edit Simulation Command/AC Analysis:
Type of Sweep: Decade Number of points per decade: 1  Start Frequency: 1k Stop Frequency:1k In this way the simulation will evaluate the response of the circuit only for the frequency of 1kHz at the different values of stepped parameter {r}.
4. Run simulation, plot V/I
5. Right click on the left vertical axis (magnitude axis), click on linear Representation.
6. Right click on the right vertical axis (phase axis), click on "don't show phase"
7. Right click on time axis. In the quantity plotted tab, check if the content of the tab is the parameter you are interested in (in this case, r). Uncheck the Logarithmic box.

In the pic you can see an example of this analysis with a part of your circuit.

New contributor
LDEG is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

I want to plot the input impedance on the y-axis and the parameter R2 on the x-axis.

In Edit Simulation Cmd select AC Analysis, 1 point, start frequency 1k and stop frequency 1k. Run AC analysis, then plot V(Iin)/I(C2) which is the impedance at Iin. Change the left Y axis from Decibel to Linear to get resistance in Ω. You should get a graph like this:-

If the simulation is slow then increase the step size to eg. 0.5k. This will produce the same curve but not quite as smooth at the low end.

• Did you mean stop frequency 1meg? Also, a current source might be a bit easier, all you need to plot is the voltage. – a concerned citizen Feb 23 at 16:43
• To get this graph we need a single frequency, then the X axis will be the value of R2. – Bruce Abbott Feb 23 at 16:54
• What I meant was that you said start=1k and stop=1k, yet the picture shows start=1k and stop=1meg. Maybe you just used some other .AC plot to exemplify, not necessarily from this example? If not, what's said and what's shown differ. That's why I asked. – a concerned citizen Feb 23 at 16:59
• Perhaps I wasn't clear enough. The X axis shows {r}, the value of R2 - not frequency! – Bruce Abbott Feb 23 at 17:16
• It's possible I misunderstood, but you said to choose an .AC analysis of one point. No matter what you choose for that, oct, dec, lin, list, all you'll get is the equivalent of .ac 1k, which will not bring up the waveform viewer, only the list of numbers with the readings. Yet you are showing an image of a sweep. This is the discrepancy I was referring to. OP will read your answer and expect a graph like your picture, but it won't appear by running a 1 point .AC analysis. There is no .STEP mentioned. If I still misunderstood, please ignore this message. – a concerned citizen Feb 23 at 17:36