I've been troubleshooting an analog circuit and have just come to the realization that Sine Voltage sources at mV are broken.
Here is one that is supposed to provide a 1mV 1Hz sine wave on top of a 300mV DC signal. Instead I get complete garbage.
Running LTSpice version 4.22. Anyone else seen this issue or can advise what is the problem?
Best Answer
Most probably you have waveform compression enabled and the compression algorithm has too high a relative tolerance to process such a signal correctly, since the AC component is so small compared to the DC offset.
Open the control panel and decrease the relative tolerance:
LTspice usually performs waveform compression to avoid generating huge data files for waveforms. The compression algorithm is lossy, so you might lose details and have artifacts like those you see on your simulation.
LTspice online help excerpt:
Sometimes it is useful to disable compression entirely, for complex waveforms, but expect GB size .raw files (these are the files where LTspice saves waveform data). Neverthelss, usually it is sufficient to play around with compression settings, but only when you reasonably know what to expect from a simulation.
EDIT (to address some relevant comments)
Some commenters have pointed out that increasing tolerances, or specifically,
reltol
SPICE parameter will increase simulation time. This is true, but compressionrelative tolerance
has nothing to do with thereltol
SPICE parameter, which is found in another tab of the control panel:To further reinforce my point, I'll cite the whole section of LTspice's help concerning the
compression
tab of the control panel (emphasis mine):Again, the last directive just amounts to disable compression as you would do using the control panel. As I've already said above, this is just what you want to do to avoid artifacts, but huge files will be generated.