The meas integ command and symbol Switch-BodyDiode

Hello,
I’m studying the double-pulse test in Qspice.
I would like to estimate Eon and Eoff using the .meas command, but I’m not sure if the command is working properly.
I wrote this command to show the integration result of Loss_low between Ton1 and Ton1 + Toff.

Also, when I introduced the switch with a diode (created by Mr. Kelvin for operation verification), the circuit behavior became strange.
When I tried using an NMOS instead, it worked correctly.

My questions are:

  1. Could you tell me the proper .meas command to integrate Loss_low between Ton1 and Ton1 + Toff?
  2. How is the internal circuit of the diode-equipped switch configured?

Thank you as always.
Double pulse1.qsch (20.4 KB)

Consider whether this custom device can be helpful. Your circuit currently operates without a load, and things can become crazy with ideal device. Are you certain that you have set up the circuit correctly for studying power and energy loss?

This device only measures energy of drain source. Do you need energy measurement for the entire device, including the gate?

Computing quantities with .meas statement - QSPICE - Qorvo Tech Forum

Hello,

The created device worked without any issues.

On the other hand, is there a way to obtain the same result using the measure integral command?

Please also teach me about the measure command for my future learning.

The challenge is that, you have to count the edge.
Here is how to use .meas for Eon and Eoff measurement.

example.MOSFET-ON-OFF-PCEProbe(.meas).qsch (9.0 KB)