I'm designing an audio amplifier and I'm trying to simulate and measure all the characteristic features of it (output power, offset, bandwidth, input/output impedances, etc.).
However, I don't know how to measure intermodulation distortion (IMD) or transient intermodulation distortion (TIM).
For IMD, I've read that one should put two generators of 19 kHz and 20 kHz in series at the input, and then measure the distortion at the output. However, I believe that for IMD, one should not take into account the harmonic distortion caused by these two signals (i.e. one shouldn't interpret the appearance of 38 kHz or 40 kHz at the output as IMD, because it is THD actually). So, how can one measure IMD in LTspice then?
Apart from that, I want to simulate the TIM. But, in this case, I don't even know how to perform this measurement. Is there a way to do it?