Installing and using LTspice IV (now including LTXVII), From beginner to advanced

Member
Joined 2010
Paid Member
True about the consistency of being aware of which install used for updates. So, one last question: If you choose the "Install for all users" option, is there an advantage over the "Install for me" option assuming you are consistent with both, and , if you are not consistent with your options, is their any negative consequences beside's the extra space used for application in Program files.
Thanks
 
Member
Joined 2009
Paid Member
Hi Mr Mooly really sorry to disturb but i am very lost with FFT
I have tried to follow your very precious directions but i think i am doing mistakes with settings and actions
I would just like to get the 1kHz distortion spectrum and stop of the simple circuit attached below
Maybe i have entered values of components wrongly I see Farad for caps ???
Could you please me redirect to the relevant post in this thread where the passages to get a FFT are depicted ?
thank you very much indeed
Kindest regards
gino
 

Attachments

  • cfp.asc
    2.1 KB · Views: 10
Last edited:
Administrator
Joined 2007
Paid Member
A couple of things wrong :)

The AC input should be like this. You set your amplitude here and the '1' is a reference designator for that voltage source, its not an amplitude setting:

Screenshot 2024-05-08 175247.png


Set the sim to 'Transient' and set a suitable run time such as 100ms which would display 100 cycles at 1kHz. Set a 'Time to Start Saving Data' and it lets the sim run for that time before displaying the result.

Screenshot 2024-05-08 175442.png


Add a load resistor and you can also label the output. Also add the Spice Directives shown to set the 'window' for sampling:

Screenshot 2024-05-08 175717.png


And the FFT Right click the area with the trace and select FFT:

Screenshot 2024-05-08 175842.png


Select Vout as the node to view:

Screenshot 2024-05-08 175948.png


If you make the caps massive and run the sim longer you get a more detailed FFT. Make the electrolytics '1' which is 1 Farad and set the sim times for 1000ms and start saving data at 600ms:

Screenshot 2024-05-08 180159.png


Modified sim:
 

Attachments

  • Modified cfp.asc
    2.4 KB · Views: 12
  • Thank You
  • Like
Reactions: 1 users
I see nobody respone on mine last post, not a problem, but the new LTspice has problems, it conflict with brave and other software, it stops simulating when I set menu invisible., it give 0.3 procent total distortion when I get -100dB on fft, and pc hangs a lot when I try to open brave for watching internet.

I have now install the old one, and no problems at all.

And no, the pc is not to blame.

UPDATE! known problems, I have a update now, try again.

UPDATE again, I get 24.07 in stead of the newest version, how strange is this.

https://www.analog.com/en/resources/design-tools-and-calculators/ltspice-simulator.html
 
Last edited:
Member
Joined 2009
Paid Member
Good evening Mr Mooly and thank you very much for your extremely kind and valuable reply
I tried to follow your instructions and settings
I think i have set something wrong because i get an ugly looking fft (file .asc and jpeg of the fft attached)

I run your modified file and it is perfect :)(y)

So there must be a problem with options setting and four 1kHz 10 4 v(vout) :rolleyes:
 

Attachments

  • cfp.asc
    2.3 KB · Views: 5
  • cfp fft.JPG
    cfp fft.JPG
    153.7 KB · Views: 6
Last edited:
UPDATE! known problems, I have a update now, try again.

UPDATE again, I get 24.07 in stead of the newest version, how strange is this.
When an update to any program causes problems, one approach is to do a complete uninstall (including deleting the installation folder in Program Files) and then do a fresh install with the latest installer, which 24.0.12 in this case. A clean install can fix a lot of issues.
 
Good evening Mr Mooly and thank you very much for your extremely kind and valuable reply
I tried to follow your instructions and settings
I think i have set something wrong because i get an ugly looking fft (file .asc and jpeg of the fft attached)

I run your modified file and it is perfect :)(y)

So there must be a problem with options setting and four 1kHz 10 4 v(vout) :rolleyes:
This is interesting: Here is what I found:
1. The max timestep needs to be a (binary?) multiple of the signal frequency and "Number of data points in time" (defaults to 262144=2^18 in FFT dialog), ie something like {1/1k/4096}. Otherwise you get a bent bumpy ~noise floor. There does not seem to be a windowing function that works better than "none" with harmonic sampling.
2. Coupling capacitors need to be huge, ie 1 farad. Otherwise, you get a slanted noise floor that rises on the left low frequencies. But using too large a value (~100) causes some kind of math problems and all the detail is wiped out, straight line.
Hope this is useful.
3. A huge time sample is unnecessary. 100mS vs 1S is fine.

OBTW, your version of cfp.asc has two R3's so I changed one to R6.
 

Attachments

  • cfp 1fbin.asc
    2.3 KB · Views: 4
  • Thank You
Reactions: 1 user
Member
Joined 2009
Paid Member
Hi ! thank you very much for all your kind and precious advice
I have used the .asc file provided to me by Mr Mooly as a base and played a little (with having any clue about what i was doing) with resistors values in order to lower the THD as much as possible
I am attaching the result with a hint from which the schematic is sourced ;)
If anyone has any advice on how to lower the THD further without making the schematic too much more complex that would be great
Thank you to all for the kind help
Have a nice day ! :)
 

Attachments

  • zd22 1st.asc
    2.4 KB · Views: 0
Last edited:
Administrator
Joined 2007
Paid Member
I think i have set something wrong because i get an ugly looking fft (file .asc and jpeg of the fft attached)

Its missing the timestep which can be calculated (see post #19 in this thread).

You can keep common settings as a notepad file and just copy and paste them in simulations.

For 1kHz:

Code:
.tran 8m
.options maxstep=0.48831106u
.option plotwinsize=0
.four 1khz 10 4 v(vout)

For 10kHz

Code:
.tran 400u
.options maxstep=0.02441555u
.option plotwinsize=0
.four 20khz 10 4 v(vout)