A question about waveform compression and waveform distortion and a feature request

A question @Engelhardt (b.t.w. nice work, thank you!) :
It was mentioned somewhere that Qspice does not use waveform compression like LTspice. However, when I zoom in on the high frequency oscillation that is seen in the current through C7 (10pF) in the demo AudioAmp.qsh then I notice that each period only has two samples. I assume this means Qspice only keeps samples it considers important to reduce the amount of data without using compression. May we know when or how Qspice decides to remove or keep samples? Moreover, presumably the min and max peaks are first found using interpolation of calculated samples, and only these peaks are kept? If so, what would be the expected accuracy of that interpolation? And does the user have any control? Specifically I’d like to understand what the implications might be for very small waveform distortions that would be visible only in the frequency domain.

This context brings be to another topic which is actually a feature request: distortion analysis (.DISTO). Micro Cap has it and it allowed me to design -160dB THD transistor circuits, and I’m pretty sure it can go much deeper still. Distortion analysis was available in Berkely Spice but LTspice and Qspice removed it, regrettably. On a transistor -or other nonlinear component- circuit .tran simulation is not able to reach that kind of waveform fidelity. Perhaps in theory it might but it would become extremely slow and would probably crash the computer, and due to the nature of simulation it would not be trustworthy anyway. The linear audio people and a few other folks would be grateful if Qspice would support .DISTO analysis again some day.

Given the tolerances, it only computed two points. It doesn’t decide to not keep any data, unless the time points are unrealistically close together in time, like 2ps.


Interesting! So, given that there are only 2 samples per period, we cannot be sure if the real amplitude is visible?