Does QSPICE have a command similar to “ddt()” for calculating derivatives? I would like to use such a command to accurately locate the time point when the current I(R3) stabilizes.
such as “.meas T_stable when abs(ddt(I(R3))) < 0.001”
If there are other methods to calculate switching losses, including oscillation effects, please let me know. Thank you!
This approach will not work for underdamped response systems as you will get multiple |dV/dt|=0 during transient.
2 Likes
Update Qspice to the latest version with the derivative function problem fixed.
02/11/2025 Fixed a problem evaluating derivatives in .meas statements.
The derivative in the B-source is ddt(x), but in the waveform viewer or post-processing (.meas), it is represented as D(x). For more details, go to Help, Waveform Viewer > Waveform Expressions.
Here is the answer to your question on how to locate that point from .meas.
Steady with derivative (.meas).qsch (2.3 KB)
2 Likes
Thank you for your reply, it was a great help! I have another question: Currently, “cross=last” only identifies the last crossing point overall. Is there a way to find the last crossing point within a specific time range?
For example:
“
.meas toff2 find time when abs(d(i(r3)))=0.1g cross=last from 1.8m to 1.9m
”
This “from-to” statement doesn’t return an error but also doesn’t seem to work. I believe this time constraint is crucial for identifying the stable point of the previous rising or falling edge.
This is an interesting question. .meas find only support AT or WHEN from my understanding. (I may be wrong). As you only have to get the last cross value, do you think using this method with if() function can help?
Steady with derivative (.meas).qsch (2.6 KB)
2 Likes
Thank you! I managed to complete it using an if
statement, though it was somewhat forced. However, the oscillations vary depending on different parameters, and using this method to locate the stable point feels rather rigid with a low tolerance for error. It would be great if a cross=last
command with a limited range could be introduced in the future!
Anyway, I really appreciate your help!
If you are certain that the event must occur between 1.8m and 1.9m, for example, you simply need to run the simulation .tran 0 1.9m 1.8m. This will save simulation data only between 1.8m and 1.9m seconds, and your .meas will only return results within this duration.
Thank you for your continued support! I would like to analyze the characteristics of the SiC FET in a buck converter, specifically the turn-on and turn-off losses. To achieve this, I need to accurately determine the start and end times of these events.
Currently, by using the “cross=last” command, I can successfully detect the turn-off loss (Eoff) at 19.9952 ms. However, I am unable to correctly locate the timing of the preceding turn-on transition. The “if” statement you mentioned yesterday partially addresses this issue. However, when circuit parameters such as the Rg change, the oscillations in Vds and Id may vary, making it risky to forcefully locate the transition using an “if” command.
Therefore, I was wondering if it would be possible to use the “cross=last” command within a constrained range, as this might help solve the issue. After all, switching characteristics are critical parameters, and there could be significant demand for such a feature.
If you have any suggestions, I would greatly appreciate your insights. Thank you!
buck_gatedrving.qsch (12.2 KB)