Do anyone know how to check the THD (fft) in a easy way in LTspice?
When I press the FFT-button, I got this window popping up. What should I select there?
Maybe an alternative is to do this instead:
I found somewhere that you need to write a SPICE directive like this:
".fourier {Freq} V(output)"
and then open and check "the spice error log."
according to this source: https://www.diyaudio.com/forums/solid-state/177820-thd-ltspice.html
Read the "Waveform Arithmetic" topic in the help file. Note the discussion about .OPTIONS plotwinsize=0 numdgt=15. Add that to the schematic. Plot about five cycles of the waveform.
In the upper plot window, VIEW/FFT generates the FFT plot, which shows that the third harmonic is down 20db from the fundamental, which is what the two sources add to...
the spice directive should be put on the schematic. if you are using a 1khz tone to test your device, and your output node is marked "out", the correct way to type the spice directive is:
.fourier 1000 V(out)
after running the sim, open the spice error log, and you will get the overall thd, plus a list of the magnitudes of the harmonics
the spice directive should be put on the schematic. if you are using a 1khz tone to test your device, and your output node is marked "out", the correct way to type the spice directive is:
.fourier 1000 V(out)
after running the sim, open the spice error log, and you will get the overall thd, plus a list of the magnitudes of the harmonics
I believe the author was on this forum a while ago... in any case, they deserve a lot of credit for this. It's far easier then thinking about the measurements yourself, and is very well documented.
THD is meaningless in the context of the circuit you posted. Doing an FFT on the output ripple shows that it has horrible ripple fed through from the full-wave rectified AC. You dont even need to do the FFT, you can see it...
THD is meaningless in the context of the circuit you posted. Doing an FFT on the output ripple shows that it has horrible ripple fed through from the full-wave rectified AC
Ah, I see. Yeah you right. So it would be more appropriate to do a THD on the current input instead, just to see how good quality the input current is? Like they did here in the document.
THD is meaningless in the context of the circuit you posted. Doing an FFT on the output ripple shows that it has horrible ripple fed through from the full-wave rectified AC. You dont even need to do the FFT, you can see it...
THD is something that is measured in a hifi audio amplifier. You put in a perfect sine wave, at say, 1000Hz. You analyze the output waveform to see if the non-linearity in the amplifier has contaminated the output signal with harmonics of 1000Hz. This has nothing to do with what you are doing; namely evaluating how well filtered (compared to DC) the output of a switching regulator is.
THD measurements are usually done on audio systems, not power supplies. what you want to look at on a power supply output is the percentage of ripple, and that's a different measurement. if you have a 5V supply, and the ripple is 100mV, that's 2% ripple, which for most purposes is fine.
In that's what you're after, you could plot the supply input current and check for harmonics of the input frequency. Ideally, the input current will be perfectly in phase with the input voltage so, if the output load is a constant resistance and the PFC is 100% efficient, there would be no harmonics. In the real world that wouldn't happen .
In that's what you're after, you could plot the supply input current and check for harmonics of the input frequency. Ideally, the input current will be perfectly in phase with the input voltage so, if the output load is a constant resistance and the PFC is 100% efficient, there would be no harmonics. In the real world that wouldn't happen .
Yes I expect some THD cause the PF can't be perfect as you say in the real world. So my input frequency is 50 Hz from the grid, but how do I select the input current in the FFT window?
--edit--
Oh, wait, is that "I(V4)" at the voltage source that I should use to get the input current? And how long should the running time be?
Now I tested for 100 ms, but is it strange that I only got 9 harmonic numbers, tough I have 15?
--edit2--
Is it possible to obtain see the image "graph.png"? Is that possible in Spice ? If not, do anyone how I create a graph like that?
Or could I used "freq4A.png" or "THD.png" like a clear result. What do you suggest? Sorry that I have so many questions