Electronic – LTspice measuring drain current when certain values of Vds and Vgs are reached

ltspicesimulation

I'm new to LTspice and I need to measure all the possible values of the drain current of a JFET when certain combinations of Vds and Vgs values are reached. That is, I need to record specific points of the output curve of the JFET.

For example: Vgs will vary from 0 to -5V in -1V steps; for each Vgs value, Vds will vary from 0 to 10V in 0.5V steps; for each Vds in each Vgs I need to record the drain current.

This could be done with nested .step directives if Vds was a voltage source (so I could use a {Vds} param), but I have this circuit instead:

enter image description here

Any idea is welcome.

Thanks in advance.

Best Answer

Here's the closest procedure I've got to the fully automated approach:

I've created a parameter called VGG for the gate voltage source, then I've stepped it throught the desired points:

.step param VGG list 0 -0.5 -1.0 -2.0 -3.0 -4.0 -5.0

Then for each desired Vds value, I've created a corresponding variable Id_ using the .meas:

.meas DC Id_<x> FIND I(R2) WHEN V(VDS)=<value>

As I needed 7 different Vds values, I had to write 7 different .meas lines (thus 7 Id_ variables). But I guess it's better to write 7 lines than writing 49 lines.