A simulation is done in LTSpice (version 4.23k)
There is an inverter:
Fig.1: schematic
1mV small-signal input.
AC analysis is run. Low frequency gain (Vout/Vin) is 20.69 dB (10.82 times).
Transient analysis (for the same schematic) is run. The amplitude of the small-signal component of Vout is 47.89 mV. It means low frequency gain is 47.89.
It means, for the DC gain, AC analysis produced 11x, while transient analysis produced 48x. Nearly five time difference!!!
1) Can you explain the divergence?
2) After this, can we rely on LTSpice AC analysis?
The link to the LTSpice files is in comments below.
Best Answer
After playing with this for a while, I think this is due to differences in the way the transient and AC analyses are calculated. I got similar results with different AC voltages, load resistances, and different MOSFET models from MOSIS. I also tried putting the AC and DC voltages in series and removing Rbig and Cbig in case those were causing trouble. I verified that 2.5V is the correct DC bias for your models.
I found poor agreement between the transient gain, AC analysis gain, and DC sweep gain at the midpoint. Agreement was much better (though not great) with a DC bias of 2.6V, which has a gain of around 3.
Here's my reproduction of the difference with the MOSIS models. The gains were 59 for DC, 38 for transient, and 23 for AC. Note the linear vertical scale on the AC analysis plot.
As to which is more correct, it seems to depend on the circumstances. Quoting from a SPICE tutorial:
From the next page:
And here's a quote from The Designer's Guide to SPICE and Spectre:
UPDATE: Based on Placeholder's comments, I tried a 10nV stimulus to see if there was any improvement. The theory behind this would be that a smaller stimulus might avoid recomputation of the operating point during transient analysis, which would bring the results in line with the linearized AC analysis. I changed Rbig to 10MΩ and Cbig to 10mF when I did these; I forget why. Unfortunately, the results are similar, despite obvious quantization problems. The transient gain is ~50 and the AC gain is ~10.
UPDATE 2: Sergei got a response from Mike Engelhardt, the author of LTSpice:
UPDATE 3: Mike sent a follow-up message: