Yes, have been using the QA403 to view the current waveform. It does indeed show a bit of distortion of the input sine. I have not yet tried with a sawtooth. Yes, I think there are a few more useful waveform shapes, a square wave should cause a triangular wave current waveform (remembering my SMPS stuff).
I have a very affordable discrete class-D from a member at diyaudio.
Here is a write-up of the method I’ve been using and it does seem to work well, nothing new here, but a bit easier than reading code I posed in the other thread.
First measure the time-domain voltage v(t) and current i(t) using the QA403. The current is measured by the voltage drop across a current sense resistor in series with the DUT. Shift into the frequency domain with an FFT,
The complex impedance is the ratio of the voltage V and current I (dropping the function-of notation, everything is now in the frequency domain),
Using,
where R is the resistive component and X_L is the inductive reactance. We have two equations and two unknowns, giving,
therefore the inductance is,