Third party mosfet current measurement

When testing the QSpice with a simple circuit, i found out that i couldnt measure the current of the mosfet M1, i used the existing PMOS symbol, and changed the attribute as used to do in LTSpice, it showed a warning but worked nevertheless. The problem is that i couldnt click on the lead to measure te current in the source pin of the mosfet, but when trying with a pmos that already came with QSpice it worked, i suppose its a bug?

And what this warning means (“MOSFET M1•M1 has L=6e-07 which is smaller than can is be realistically modeled with a level 3 equations.”)?


Three techniques for current measurement for FET

  1. Add a series resistor to drain and probe its current
  2. Add a 0V voltage source, and probe its current. This is a common technique in spice (+ve current direction represent current flow from + to - within the voltage source, i.e. +I(Vd) flow downward in this example)
  3. In waveform viewer, Ctrl+A, select Id(M1) to add drain current for M1.


for the warning, you can refer to this post

1 Like

You can probably ignore the warning. The model is a macromodel and physical concerns for using unrealistic sizes where the device equations aren’t valid aren’t an issue.

1 Like

Thanks so much for the help, i tried the techniques you suggested me, the 1º and 2º worked nicely, but when trying the 3º the mosfet didnt show on the list, i found that really weird, and still trying to undestand why i can measure the current by clicking on the lead of a standard mosfet that came with Qspice library, but i cannot with the one imported. Could this be related with the issue i have with the 3º technique?


if you right click on M1, select Selection Guide, and pick standard model, can you see Id(M1)?

I think you created a symbol to call the sub-circuit for DMG1013T pmos, as from your first message, it is a .subckt model. If it is subckt, it will not have Id(M?) for selection. To have Id(M?), your model must be a MOSFET (Mnnn). For a subckt, can only use method 1 or 2 from my knowledge.

Yes, not only it shows the id, but i can also click on the drain lead to display on the waveform viewer.

It is a subckt, but i didnt created a symbol, i did as i used to do in ltspice, which was changing the prefix to “x” and the value to the subckt name, but in Qspice is the attributes are different, so i changed the symbol type to x (otherwise it says “Fatal error: Model M has wrong MOSFET polarity for instance M1” when simulating) and the 1st attribute to the model.

In LTspice was possible to measure current even being a subckt, i find it weird that this doesnt work on its sucessor.


(i deleted the other reply because i couldnt edit it, kept getting an error)

I don’t know a MOSFET device can force to a subckt X, thanks for sharing this technique.
As I always create symbol for subckt FET model, it was my practice to add 0V voltage source for current monitoring and therefore, not realize the situation you encounter.

In some simulator likes PSIM, they need a current probe to add into schematic for current measurement, therefore, direct measurement of a current by clicking a symbol not bother me that much.

May be you can discuss with Mike to see if he think current measurement of symbol M should work as its sucessor when its convert to subckt

I see, its nice workaround doing that with voltage source in the symbol creation, thanks for the help.
How could i discuss it with mike?