Geoffrey_Coram
|
You can just use if statements, but you should verify for yourself that the equations you've written (and their derivatives) are continuous across the if statement.
If your simulator supports an ac analysis with a swept bias (instead of a swept frequency), you can easily check the ac currents from all four terminals as you sweep across vds=0. Create 4 instances in your netlist, with an ac voltage source on a different terminal for each.
|