| Electronics > Projects, Designs, and Technical Stuff |
| THD vs frequency |
| (1/1) |
| Lucky-Luka:
Hi all I've found this link: http://www.audio-perfection.com/audio/audio-total-harmonic-distortion-analyzer-for-ltspice-making-thd-vs-amplitude-and-frequency-sweeps-in-ltspice.html I'm trying to understand how to use this script properly. Can someone tell me how I can plot the THD vs freq graph? After I've simulated the given example , I went to the error log (CTRL-L) and than I right clicked the log window. THD vs output amplide graph appear after I select "plot selected meas data" I have even changed the analyzer_controls.txt commenting the amplitude sweep and uncommenting the freq sweep but the result doesn't change: I cannot display the THD vs freq graph I'm looking for. If there is another method to achieve a thd vs freq graph using LTSpice it's ok for me. Cheers |
| Calvin:
Hi, here“s one I found quite simple and useful. Open the .txt File with a editor and configure the analyzer parameters after your fashion (basically its just commenting/uncommenting lines and setting a fixed parameter) You can choose either THD over Frequency at a fixed Amplitude, or THD over Amplitude at a fixed Frequency. The analyzer runs multiple transient runs, which means that calculation time becomes long and raw-File size can become very large. Plotting results: View --> Spice error Log and then Plot .step'ed .meas data regards Calvin |
| Lucky-Luka:
Hi I attach 2 pics. The first one shows the configuration text file. Is it ok to comment it like that to obtain THD vs freq? The second pic is the error log after the simulation has finished. An error and several warnings... What do you think about it? Cheers |
| Navigation |
| Message Index |