Three level flying cap Gan.

Ahh Yes the old ones I have now used and has succes, however there is a new LTspice who has this also .fra symbol for open loop
simulation and is also faster. Is for smps feedback but also opamps so I think class d can also be used. Only I have such peaky result
in FFT who I have also in normal view except when set it to 5 and use blackman harris. I can not change that in loop sim result.

https://www.diyaudio.com/community/threads/installing-the-new-2023-version-of-ltspice.394676/
 

Attachments

  • ScreenHunter 2093.jpg
    ScreenHunter 2093.jpg
    265.8 KB · Views: 54
I'll take a guess, and probably be wrong, that the new .fra component/statement is just the old one rolled into a subcircuit that lets you place the old method into a circuit without having to add the,

.measure Aavg avg V(a)
.measure Bavg avg V(b)
.measure Are avg (V(a)-Aavg)*cos(360*time*Freq)
.measure Aim avg -(V(a)-Aavg)*sin(360*time*Freq)
.measure Bre avg (V(b)-Bavg)*cos(360*time*Freq)
.measure Bim avg -(V(b)-Bavg)*sin(360*time*Freq)
.measure GainMag param 20*log10(hypot(Are,Aim) / hypot(Bre,Bim))
.measure GainPhi param mod(atan2(Aim, Are) - atan2(Bim, Bre)+180,360)-180
.param t0=1m
.tran 0 {t0+25/freq} {t0} 100n uic
.step dec param freq 5K 500K 20
.save V(a) V(b) V(out)
.options plotwinsize=0 numdgt=15

Statements to your circuit on screen.

and just done for convenience.

https://www.diyaudio.com/community/...version-of-ltspice.394676/page-5#post-7280873

"I am not a expert at this and can't be sure if I had the .fra parameters configured properly. The .fra parameters can be changed by right clicking on the symbol."

Perhaps if you right click on the new symbol you might see the new parameters match the old statement parameters and, once again, you are left guessing what to change in order to produce less jaggy waveforms with, unfortunately, longer run times.

I did install a newer version of LTSpice but my decibel FFT plots became triangles and I liked the arch windows so I got rid of it.

In news elsewhere Mr Englehardt is taking signups for a new creation.

https://groups.io/g/LTspice/topic/new_simulator_written_by_mike/98208355
 
Hi

Yes you had it right, I did use it a lot, and get quite good results. Happy with the analog version also, who I use
for analog amps.

I did also discover how difficult it is to get a good class D and have also look at commercial designs who
has not that super what everybody do say. Class D needs Mhz switching for good results, that is why I do
multilevel on this moment.

I get dramatic low HD but very unstable, or I get higher HD and it is stable.

The MECC system did the best, but mucho feedback do not make it sound better, IM in class d is a very big problem, and also slewing
because of the small bandwidth. It is as the old videorecoeder who has limiting video to 3 mHz. and with some art get corrected with
not better picture (noise).

The new future digital systems with Gan are promising.

self oscillating is also better, (more bandwidth.) I do multilevel, and get also much better results Fswitch devided to Pi much higher..

Picture is from LTspice Fra symbol.
 

Attachments

  • ScreenHunter 2090.jpg
    ScreenHunter 2090.jpg
    165.4 KB · Views: 53
As an aside and given you are dealing with switching circuits there is a thing that might help with the temptation to reduce the step size in a transient analysis in order to get better results which might speed up the analysis. It probably works better if you do not include the kitchen sink but for signals that are digital where LTSpice does not know when they are going to change you can place a BSource to mimic a value and set it's Tripdv and Tripdt levels to something that makes it go back and think again when things change too much.

Screenshot from 2023-05-09 18-46-04.png
 
Last edited:
I think even that I do not need a switching part for loop sim.

the analog version does work, I do include the filter in it and set a gain of (in mine case) 24 for the modulator part (here just a amp).

I only need to see what the PID does and the zero,s and poles to set right, and yes it is quite sensitive there, not for nothing
class d chips does get trimmed here.