Is it possible to fix the transient step size ? I understand that it intentionally dynamically varies to optimize the solution time, but because it does that, I believe I need to interpolate the data. I think if I export the data from the waveform viewer, it does the uniform sampling export of the data, but I’m running the simulation from the command line (via Matlab), and would like to force the the trans statement to use uniform stepping. Possible?
Thank you!
Although there is a discussion about the possibility of achieving a uniform step by inserting timestep at user-specified breakpoints and parsing data from there, rather than using an interpolation approach (How to set the timestep to be a constant in transient simultion?), Qspice seems to just follow the standard SPICE and only run with dynamic timestep. (i.e. no fixed step in using QSPICE64/80.exe to run a netlist)
In Qspice, as you mentioned, uniform sampled data is exported in the waveform viewer, which is done by QUX.exe. The batch mode command to export data can be found in Qspice Help > Waveform Viewer. However, if you have already imported raw data into Matlab, resampling in Matlab may be a more direct approach.
I think you already find a way to load your simulation results back into Matlab per @KSKelvin suggestion.
If you are open to prepare your own C++ block, you can sample your signal of concern on-the-fly as your simulation goes.
I wrote my C++ code close to your interest, in my articles, though not exactly matches to your need here.
This C++ code at my GitHub samples node voltage and forcing to place my own time points. (It shoots a transient event at my target, then forces fine time steps to analyze the response.)
My next C++ block in the article below does peak detection. The screenshot is on my PyQSPICE but this orange waveform is one of the QSPICE circuit node results can be plotted in native QSPICE viewer too.
If you wish, you can modify this code as a fixed time sampling block, or fixed time digitizer.
(This version of C++ code contains a copyright IP and not public, I can share the code without such IP with you per your request.)