Originally posted by john curl I don't have a display yet for the computer. Am promised one in a week or two.
Hi John,
Regrettably, you doesn't live around the corner, otherwise you could have my 19" Eizo CRT.
Cheers, Edmond.
I appreciate the thought. My associate promised one to me, but he is off to the 'Burning Man' festival. He won't be back for more than a week.
It's probably well known to those here, but you can parameterize the tricks that andy_c is talking about. I.e., rather than manually calculate the timestep, start and end time, you can add .param directives to calculate the required values for you based on frequency, cycles, etc. The attached circuit shows an example of this. 'freq' is the frequency of interest. 'cycles' is the number of cycles to capture. 'points' is the "Number of data point samples in time" from the FFT dialog. 'burn' is the number of cycles to skip before saving data.
Since the FFT requires that the number of points be a power of 2, I usually end up multiplying two smaller number together (i.e. 2048*2048 is easier to type and remember than 4194304).
As mentioned, make sure you turn off compression.
I think maybe I still have some sort of off-by-one issue or somesuch, since I only get 160db or so down from the fundamental at 200kHz for the simulation shown, but it's probably overkill at that point anyway. 😉
Since the FFT requires that the number of points be a power of 2, I usually end up multiplying two smaller number together (i.e. 2048*2048 is easier to type and remember than 4194304).
As mentioned, make sure you turn off compression.
I think maybe I still have some sort of off-by-one issue or somesuch, since I only get 160db or so down from the fundamental at 200kHz for the simulation shown, but it's probably overkill at that point anyway. 😉
Attachments
I get plenty of FFT precision in LTSpice simply by turning off compression and then selecting an integer multiple of the period to analyze. You may set the sim time to 10ms, but it won't sim exactly that much, you must select an exact multiple of the period of interest from within the FFT window.
I usually only sim 6 cycles of whatever frequency I'm using, then I throw out the first 1 and the last 1. 160-180db "noise" floor is typical.
P.S. I just pulled a random complete amplifier from my personal archive, 180db noise floor from a 6ms sim completed in 0.251 real time seconds.
I usually only sim 6 cycles of whatever frequency I'm using, then I throw out the first 1 and the last 1. 160-180db "noise" floor is typical.
P.S. I just pulled a random complete amplifier from my personal archive, 180db noise floor from a 6ms sim completed in 0.251 real time seconds.
Clean FFT
Thanks to all !!
Those tricks I had been using so far, but as Andy said I wonder whether there are still some more to pull.
The .param shortcut by Nature BOy is cute!!
Rodolfo
Thanks to all !!
Those tricks I had been using so far, but as Andy said I wonder whether there are still some more to pull.
The .param shortcut by Nature BOy is cute!!
Rodolfo
LTSpice
Reading the last couple of posts about LTSpice, I get the impression that this simulator is a potential candidate for a hate/love relationship. Running a FFT in Micro-Cap is much simpler. Just specify the starting and ending time of one cycle of the fundamental frequency and pick the number of FFT points from a table (of course powers of two).
You can use any time step, however, the smaller the time step the smaller the noise floor. When using 1ns and 20kHz, for example, the noise is 250dB down.
Cheers,
Reading the last couple of posts about LTSpice, I get the impression that this simulator is a potential candidate for a hate/love relationship. Running a FFT in Micro-Cap is much simpler. Just specify the starting and ending time of one cycle of the fundamental frequency and pick the number of FFT points from a table (of course powers of two).
You can use any time step, however, the smaller the time step the smaller the noise floor. When using 1ns and 20kHz, for example, the noise is 250dB down.
Cheers,
One more tip
One more tip.
I had lately been working out simulations for a 2MW igbt inverter, 3 level. Rather complex circuits with multiple subcircuits can easily make for hugh waveform files (*.raw), hundreds of Mb to over a Gb. Space considerations nonwithstanding, screen refresh may be a pain as well as addition of traces to display.
What I do then is to specify the time to start capturing data to the begining of the last cycle, where I will be doing detailed analysis and FFT. This way, the *.raw files only grow to the actual usefull amount of data.
Rodolfo
One more tip.
I had lately been working out simulations for a 2MW igbt inverter, 3 level. Rather complex circuits with multiple subcircuits can easily make for hugh waveform files (*.raw), hundreds of Mb to over a Gb. Space considerations nonwithstanding, screen refresh may be a pain as well as addition of traces to display.
What I do then is to specify the time to start capturing data to the begining of the last cycle, where I will be doing detailed analysis and FFT. This way, the *.raw files only grow to the actual usefull amount of data.
Rodolfo
Nelson Pass said:
I vote for that. It would be great to develop a nice library of
models for parts.
😎
Amen to that!
Bob
I have no real right to say this, but I think we all need to use the wiki more (oh the hypocrisy
). I think it could become an amazing resource.

I just spent a little bit of time looking at that. It was enough for me to decide I'm not going to mess with it.
andy_c said:I just spent a little bit of time looking at that. It was enough for me to decide I'm not going to mess with it.
DOWN WITH WIKI!!
WE WANT A STICKY!!
(I've only been working on that slogan for about 3 hours)
G.Kleinschmidt said:Are the moderators listening?
Yes. AFAIK they are working on it.
Jan Didden
Bob Cordell said:
Amen to that!
Bob
But please add explanations to how add models to various, famous programs (such Orcad Capture). A kind of an how-to

imo the wiki will remain useless until there is a method for including inline images, schematics, graphs, ect
I assume diyAudio is unwilling to take on the possible bandwidth demand, and isn't allowing inline image links in the wiki
maybe a organization can have a photo hosting account on one of the free services?
I assume diyAudio is unwilling to take on the possible bandwidth demand, and isn't allowing inline image links in the wiki
maybe a organization can have a photo hosting account on one of the free services?
Hi jcx,
I tried to start a thread that would have distilled information on fake transistors. It got filled with garbage eventually. We would have to be ruthless with any thread to keep it useful for our members. Just one of a few concerns. Our members help in identifying trash would be required simply to keep up with everything. We need everyone's help on this one I think.
-Chris
Well, disk and bandwidth cost money and there are no membership fees here. A free file hosting service was the direction I suggested earlier. Providing a forum would be our pleasure and we can see the value in this.I assume diyAudio is unwilling to take on the possible bandwidth demand, and isn't allowing inline image links in the wiki
I tried to start a thread that would have distilled information on fake transistors. It got filled with garbage eventually. We would have to be ruthless with any thread to keep it useful for our members. Just one of a few concerns. Our members help in identifying trash would be required simply to keep up with everything. We need everyone's help on this one I think.
-Chris
That is, in my opinion, the whole point of a wiki. It takes all the good stuff that one finds in the forum and let's the users clean, rearrange and organize it. Threads like this one are perfect examples of why the wiki could be useful; there have been so many interesting things said in this thread, but unless you know exactly what you're looking for you have to drudge through 2489 posts to find it.
- Home
- Amplifiers
- Solid State
- Bob Cordell Interview: BJT vs. MOSFET