Ok I tried, and I am not getting what I espected
Here is my netlist, I designed a 20kHz 1st order LPF and I inject a 2GHz square wave into it. If I do FFT at the input waveform I should espect to see a fundalmental component at 2GHz and 1st odd harmonic at 6GHz.
But instead I got this (please refer to the attached GIF)
Here is my netlist
* LPF FFT Testing ********************************
.option post
rlpf in out 20k
clpf out gnd 397.89pF
vin in gnd ac=1 dc=1.2 pulse(0.9 1.5 0 100p 100p .9n 2n)
~~~~the frequency is 500Mhz not 2G, right?
.fft v(out,gnd) np=1024 start = 70u stop = 80u freq = 2G window = kaiser alfa = 2.5
.fft v(in,gnd) np=1024 start = 70u stop = 80u freq = 2G window = kaiser alfa = 2.5
~~~~~~~~~~~~~~
sim time for fft is 80-70=10u, and your freq bin is 1/10u=100kHz, so your freq range is 100khz*1024/2=50mhz, so you can only see frequency components within 50MHz.
try this:
vin in gnd ac=1 dc=1.2 pulse(0.9 1.5 0 100p 100p .24n 0.5n)
.fft v(in,gnd) np=8192 start = 70u stop = 71u freq = 2G window = kaiser alfa = 2.5
.ic out 1.199
.tran 50p 100u
.ac dec 100 1 10G
.graph par('vdb(out)-vdb(in)')
.end
***********************************************[/img]