I am developing an LTspice model for a novel transistor that behaves much like a MOSFET. But in simulations, I get a behavior I don't understand.

I've modeled this device using a behavioral current source using a particular form of the transconductance equation:

\$ I=\large\frac{Channel_W}{Channel_L}\small*Channel_d*u*C*(Vgs-Vt0)^2 \$

When I sweep the gate voltage, I want to see a change in the current corresponding to the saturation regime--I haven't modeled the linear regime yet--but instead, my model always drops from 1A to 0A across the sweep.

Is this an issue with LTspice that I don't understand or have I made a silly mistake here?

Attaching my schematic for the test circuit and subcircuit, netlist and simulation below. Thanks!


* /Users/Owner/Documents/LTspice/OECT/OECT_test.asc
XX1 Gate 0 N001 oect_model
V1 Gate 0 V
R1 0 N001 .1

* block symbol definitions
.subckt oect_model Gate Source Drain
B1 Source Drain I=(Channel_W/Channel_L)*Channel_d*uC*(V(Gate, Source)-Vt0)^2
.param Channel_W=1u Channel_L=5m Channel_d=5u
.param uC=75T Vt0=0
.ends oect_model

.DC v1 -1 2 .01

Test circuit with sub-circuit

Sub-circuit schematic



1 Answer 1


I believe your answer is found within the built-in LTspice Help (press F1 to bring it up) under B. Arbitrary Behavioral Voltage or Current Sources. Check the 2nd table on that help page. It looks to me like you're unintentionally using an XOR operation in your equation and should be using the double asterisk (**) instead.

enter image description here

  • 1
    \$\begingroup\$ That did it. Thank you! \$\endgroup\$
    – jtwillia01
    Apr 19, 2023 at 17:18

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.