Given (in this case) a square wave of fixed frequency, fast but non-zero rising & falling edges, 50% duty cycle, and an exact integer number of cycles (etc.), what's the narrowest possible harmonic bandwidth that ought to be expected? In other words, when is the simulation as optimized as it can be?
On a more general note, assuming artifacts of a non-ideal simulation have been minimized, does the harmonic bandwidth provide useful information, or do only the peak values matter?
Just curious,
Steve K.
toggle quoted message
Show quoted text
--- In LTspice@..., Andy <Andrew.Ingraham@...> wrote:
ronw6wo wrote:
To gain some FFT experience I checked the bandwidth of individual
harmonics of a 14MHz square wave They show as having a bandwidth of 1.5
MHz which is ridiculous I have tried many simulation settings but they all
produce the same results What Pulse and tran settings should I be using ?
I don't use FFTs regularly, but some things you should be doing include:
Disable waveform compression (.option plotwinsize=0).
The simulation must run for an exact integer multiple of cycles, and turn
off Windowing in the FFT. Either of those can make the components wider.
More data points at finer time increments is usually better. Specify a
Maximum Timestep in the .TRAN command.
Many circuits start with a burp, which you might not always notice.
Remember, a transient simulation begins with the variable sources turned
off, and then suddenly they are turned on. That can cause a bias shift if
signals are AC-coupled anywhere ... which translates into a widening of the
FFT components. To avoid that when it happens, don't start saving data
until after the bias has settled or the transient has died out ("Time to
Start Saving Data" in the .TRAN command). Remember to adjust the stop time
accordingly so you still have an integral number of cycles saved.
Also, don't forget, you can't make perfect "square" waves. The Pulse
waveform rise and fall times should not be zero.
Andy