Diamond buffer

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
In the transient analysis Edit Simulation Command window go lower with maximum timestep, this will lower the noise floor. (Total length of the simulation will determine the bottom limit frequency.) To make sure about the results, always observe (include in the analysis) the signal at the input.

Pedja

Edit: How many answer giving people here...! ;)
 
Hello Per-Anders,

Nice board! Looks sexy with the surface mount devices.

Regarding the LTSpice FFT stuff, it appears that if the time steps of the transient simulation don't match up with the required FFT time data points, LTSpice will interpolate to get the voltages it needs at the FFT time points. The interpolation increases the residual distortion. So if you choose the transient time steps so that the data points match up exactly with what the FFT needs, you will minimize your residual distortion. Here's an example of a 20 kHz distortion measurement. You can probably improve on the residual from what I have by further experimentation, but I've found the below technique to work well enough and is fast enough too.

Choose total number of cycles = 12

Choose the number of cycles for the FFT to be the last 5. This gives slightly "fat" spectral lines, but this doesn't bother me. So we have the duration for the FFT to be 250 usec, that is, 350 usec to 600 usec.

So stop time = 600u in transient analysis setup.

Use the default number of FFT points, which is 16384. Pick the time step to be the 5 cycles divided by 16384.

Time step = 250u/16384 = 1.5258789e-8

Do your transient analysis and bring up the FFT dialog. Choose "specify a time range", and enter 350u for the start time. If the integration method is trapezoidal or modified trap (the default), for some reason LTSpice will choose something like 599.99u for the stop time. This is wrong. Delete it and enter 600u instead. Oddly, if Gear integration is chosen, LTSpice will choose this number to be the correct 600u value. But Gear can suffer from some accuracy problems and should probably not be used.

Another thing to watch out for: If you disable compression (which you should) then save your file, the next time you open it again and run the simulation, LTSpice seems to re-enable the compression again. Very annoying. One last note. LTSpice displays the FFT data in dBV. So if you want the fundamental to read 0 dB, just scale the voltage in the output expression so the fundamental is 1 Volt RMS.
 
Thanks Andy. I really like SMD audio. It feels good to hold in the hand. So small and thin. I'm really keen on making a power amp with a SMD driver with SMD parts as much as possible.

Andy, I followed your instruction from last time when we were into current feedback. Now I have done as you say, 20 kHz, 12 cycles, used the 5 last, and 16384 steps. I have also tried 65536 steps and the resolution won't get better in the area of up to 5th harmonic. How sharp harmonics can you get if you simulation a diamond buffer, mine exactly or a basic one?

My harmonics (even the fundamental) is quite wide or fat.

New picture....
 

Attachments

  • qrv05r0_overview.jpg
    qrv05r0_overview.jpg
    43.8 KB · Views: 695
Per-Anders,

If you want narrower peaks on the spectrum, just do the FFT on more cycles of the waveform (say, 10 instead of 5). But this means you'll need more total cycles in order to start at the same delay from the start of the transient, and you'll likely need more points in the FFT too. A linear frequency scale also helps keep the harmonics from looking like they're squeezed together at high frequencies.

For my power amp sim, I just increased the total number of cycles from 12 to 24, and did the FFT on the last 10 cycles instead of 5, choosing 32768 points. This brought my residual distortion down to less than -180 dBc. The peak values of the distortion spectrum are the same as with the fat spectral lines, so I don't think the extra simulation time is worth it. BTW, back when we were looking at current feedback stuff, I hadn't gotten the residual distortion down lower than about -100 dBc, so take my older comments with a grain of salt. I'm still learning this tool myself, and the FFT settings are very fiddly to set up.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.