2
\$\begingroup\$

I have this circuit in LTSpice to test a PMOS model:

enter image description here

and this matlab function that implements a basic pmos with the characteristics equations:

V_th = 1;
lambda = 0;
K = 1.6*10^(-3);

if v_gs > V_th
    I_d = 0;
elseif (v_gs <= V_th) && (v_ds > v_gs - V_th)
    I_d = K * ((v_gs - V_th) * (v_ds) - ((v_ds^2)/2)) * (1 + lambda * abs(v_ds));
elseif (v_gs <= V_th) && (v_ds <= v_gs - V_th)
    I_d = 1/2 * K * (v_gs - V_th)^2 * (1 + lambda * abs(v_ds));
end

If i plot both the IV characteristics i notice that the "matlab" pmos switch off as expected but the LTSpice one no. (dashed - LTSpice, solid - Matlab)

How can I make the two identical in the IV-behaviour, where i am doing it wrong?

Thanks

\$\endgroup\$
8
  • \$\begingroup\$ Vto needs to be negative for enhancement PMOS. See built in LTspice help: ltwiki.org/LTspiceHelp/LTspiceHelp/M_MOSFET.htm \$\endgroup\$ Commented Dec 3, 2023 at 20:58
  • \$\begingroup\$ In case you are intentionally intending to simulate a depletion mode FET, what happens if you set MOSFET parameter Is to zero: Is=0? This will remove the body diode from the SPICE implementation. \$\endgroup\$ Commented Dec 3, 2023 at 21:19
  • \$\begingroup\$ @SteKulov nothing change... \$\endgroup\$ Commented Dec 4, 2023 at 20:22
  • \$\begingroup\$ In LTspice, are you measuring drain current or source current? \$\endgroup\$ Commented Dec 4, 2023 at 21:55
  • \$\begingroup\$ @SteKulov Source current, to ground \$\endgroup\$ Commented Dec 4, 2023 at 23:25

1 Answer 1

1
\$\begingroup\$

There are two main discrepancies between your MATLAB implementation and what LTspice does.

First, there are two substrate PN junctions that SPICE models in addition to the drain current equations. Since you have the body node shorted to the source node, then only one is active. Regardless you can disable both of them by adding Is=0 to your model definition. NOTE: Because you have the source/body grounded and you're measuring source current instead of drain current you won't see this discrepancy. However, it's still a good idea to disable the substrate diodes in case these specific circumstances change in any of your other experiments.

Second, your equations don't exactly match what the SPICE engine is doing. Take a look at page 347 of Nagel's original SPICE2 thesis along with a scan from Semiconductor Device Modeling with SPICE 2nd Ed. by Massobrio & Antognetti.

enter image description here

enter image description here

Notice how both references swap the drain and source nodes when in the reverse/inverted region of operation? To match what LTspice is doing, you will need to modify your MATLAB equations to mimic that.

The textbook scan also describes the substrate diodes I mentioned earlier, along with a diagram of them in the top-left corner.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.