| General > General Technical Chat |
| FFT in LTSPICE XVII - force settings |
| << < (2/2) |
| SiliconWizard:
--- Quote from: fcb on May 18, 2020, 01:49:49 pm ---Thanks SiliconWizard. That fix does work and is saving my sometime. Still be nice if their were .op options to force the settings of the FFT, perhaps someone from LT/AD will read this. --- End quote --- Maybe. IMO, the FFT view is an integral part of the waveform viewer, and thus follows the same "philosophy". It's meant to be interactive. And then, your need could actually be translated to other parts of the viewer. I find LTSpice's waveform viewer to be lacking in a lot of areas actually - would be nice if it could get a good overhaul. You may take a look at Micro-cap 12 (which has been made free) to get an idea of what a nice waveform viewer could be. |
| Jay_Diddy_B:
Hi FCB, Since you can't share your circuit, I will share mine: If I run this model I get: Which includes the start up behaviour. If use the FFT function, the default is: and the resulting FFT is: If I look at the FFT for the last 10ms, that is from 10ms to 20ms I get> Which doesn't include the start-up. What do you want to do? using my model an example. Regards, Jay_Diddy_B fft transient.asc (0.62 kB - downloaded 53 times.) |
| Jay_Diddy_B:
Hi, You can also do this: The simulation will run three times. Each time it runs 10ms after the start. The resulting FFTs are: Regards, Jay_Diddy_B |
| Jay_Diddy_B:
Hi, IF I add: .four 1kHz I(R1) to the model, and look at the SPICE error log: --- Code: --- Circuit: * D:\projects\eevblog fft 2020\fft transient.asc Direct Newton iteration for .op point succeeded. .step start=0 N-Period=1 Fourier components of I(r1) DC component:-3.14927e-005 Harmonic Frequency Fourier Normalized Phase Normalized Number [Hz] Component Component [degree] Phase [deg] 1 1.000e+03 3.370e-02 1.000e+00 -105.99° 0.00° 2 2.000e+03 1.550e-04 4.601e-03 22.40° 128.38° 3 3.000e+03 2.728e-03 8.096e-02 91.57° 197.56° 4 4.000e+03 5.102e-05 1.514e-03 9.58° 115.57° 5 5.000e+03 8.626e-04 2.560e-02 88.42° 194.40° 6 6.000e+03 3.191e-05 9.470e-04 5.73° 111.72° 7 7.000e+03 4.242e-04 1.259e-02 86.38° 192.37° 8 8.000e+03 2.342e-05 6.949e-04 3.71° 109.70° 9 9.000e+03 2.519e-04 7.476e-03 84.61° 190.60° Total Harmonic Distortion: 8.631035%(8.665294%) .step start=0.01 N-Period=1 Fourier components of I(r1) DC component:2.26431e-007 Harmonic Frequency Fourier Normalized Phase Normalized Number [Hz] Component Component [degree] Phase [deg] 1 1.000e+03 3.356e-02 1.000e+00 -105.71° 0.00° 2 2.000e+03 5.077e-05 1.513e-03 6.05° 111.76° 3 3.000e+03 2.651e-03 7.901e-02 92.45° 198.16° 4 4.000e+03 1.684e-05 5.019e-04 0.20° 105.91° 5 5.000e+03 8.159e-04 2.431e-02 89.68° 195.39° 6 6.000e+03 1.029e-05 3.066e-04 -1.78° 103.94° 7 7.000e+03 3.890e-04 1.159e-02 87.78° 193.49° 8 8.000e+03 7.340e-06 2.187e-04 -3.27° 102.44° 9 9.000e+03 2.256e-04 6.723e-03 86.01° 191.72° Total Harmonic Distortion: 8.376411%(8.406611%) .step start=0.02 N-Period=1 Fourier components of I(r1) DC component:-3.13169e-007 Harmonic Frequency Fourier Normalized Phase Normalized Number [Hz] Component Component [degree] Phase [deg] 1 1.000e+03 3.362e-02 1.000e+00 -105.78° 0.00° 2 2.000e+03 4.760e-05 1.416e-03 8.29° 114.08° 3 3.000e+03 2.518e-03 7.489e-02 92.26° 198.04° 4 4.000e+03 1.382e-05 4.112e-04 2.48° 108.26° 5 5.000e+03 7.324e-04 2.178e-02 89.08° 194.87° 6 6.000e+03 8.120e-06 2.415e-04 -4.98° 100.80° 7 7.000e+03 3.455e-04 1.028e-02 85.86° 191.64° 8 8.000e+03 5.745e-06 1.709e-04 -6.79° 99.00° 9 9.000e+03 2.130e-04 6.334e-03 85.15° 190.93° Total Harmonic Distortion: 7.893936%(7.932186%) Date: Mon May 18 10:55:51 2020 Total elapsed time: 1.422 seconds. tnom = 27 temp = 27 method = modified trap totiter = 7807 traniter = 7804 tranpoints = 3903 accept = 3183 rejected = 720 matrix size = 4 fillins = 0 Matrix Compiler1: off [0.2]/0.2/0.2 Matrix Compiler2: off [0.2]/0.4/0.3 --- End code --- I have the THD for the three windows. Does this help? Jay_Diddy_B |
| fcb:
The problem I had was that until circuit settled down (after ~1ms) the FFT would show LF garbage. By reducing the visible data (.tran 0 2ms 1ms 1ns) to between 1ms to 2ms I solve the problem with the FFT settings not 'sticking', but I'm also interested in looking how .raw looks from 0-2ms. It's a minor but irritating thing. Traces below: 0-2ms 1-2ms |
| Navigation |
| Message Index |
| Previous page |