Electronic – LTSPICE – Plot power

ltspicepower

How do I plot power in LTSPICE ?

I browsed a few tutorials. Acc to them, you click and ALT on the element you want to find power of.

But my problem is I do not have a schematic. I prefer to build circuits with netlists. How do I plot power now ?

Also there is this strange problem that .plot statement generates an empty plot pane and we have to manually add traces. How do overcome this problem ?

I am including a simple inverter netlist for reference.

***Inverter***

M1 pdrain pgate psource psource PMOS_1
M2 pdrain pgate 0 0 NMOS_1
C1 pdrain 0 100f

Vin pgate 0 PULSE 0 3.3 10ns 1ns 1ns 20ns 41ns
Vdd psource 0 DC 3.3

.model NMOS_1 NMOS (LEVEL=2 W=2.88u L=1.44u VT0=6E-01 KP=20E-06    GAMMA=5E-01 LAMBDA=5E-02)

.model PMOS_1 PMOS (LEVEL=2 W=5.76u L=1.44u VT0=-6E-01 KP=7E-06 GAMMA=5E-01 LAMBDA=1E-01)

.tran 0.1p 50n
.plot tran V(pdrain)

.end

Best Answer

Ok. I figured out the answer (accidentally).

The whole problem was that .plot command was generating an empty plot pane and I had to explicitly pick traces from the list. In the list there were only currents and voltages.

So to plot another expression involving currents and voltages do this:

1) Pick visible traces by clicking on icon and plot something.

2) On the top of the pane, right click the name of the quantity plotted (Cursor changes to hand icon there). For instance, if you plot V(pdrain) as in example, right click it (which appears at the top in color)

3) A dialogue box appears in which you can input the desired expression. I entered V(pdrain)*Id(M1) instead of V(pdrain)

If someone would like to answer or solve the problem such that entire thing can be done from .plot command only without explicitly picking up traces, please feel free to answer.