
Home  Forums  Rules  Articles  The diyAudio Store  Gallery  Blogs  Register  Donations  FAQ  Calendar  Search  Today's Posts  Mark Forums Read  Search 
Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators 

Please consider donating to help us continue to serve you.
Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving 

Thread Tools  Search this Thread 
6th January 2010, 05:34 PM  #101 
diyAudio Member
Join Date: Dec 2009

Hello Friends.
Might be easier if I explain what I'm doing. I have an opamp constant current source that is varied by the voltage on its noninverting input. I want to model the current through the load output by varying a potentiometer on the noninverting input. I started out varying the value of the resistive elements of the pot and plotting on a paper graph the load current but was thinking there must be an easier way to do this with such a basic circuit / simulation. The step does work as it gives me various curves, except its difficult to work out what curves (flat DC current lines actually) relate to what values.
__________________
Would you be my valentine ? 
13th January 2010, 09:56 AM  #102 
diyAudio Member
Join Date: Apr 2007

Hello
I've done many sim with LTspice. But wen, in some amps circuits, I ad a boost filter it's change totally the distortion FFT spectrums, boosting much more the distortion than it could possibly normally happen. I have done a small 50 w amp sim, as an example, to show the problem, in the second amps I've add a 5 db treble boost in the gnfb. Even if we count the 5 db boost, it should not do so much more distortions. Which setting I have to change to get it right ? I include a zip file of the .asc files of the two amps. Thank you Bye Gaetan 
14th January 2010, 05:31 AM  #103  
diyAudio Member
Join Date: Dec 2006
Location: Where the sky loves the sea

Quote:


14th January 2010, 05:53 AM  #104 
diyAudio Member
Join Date: Dec 2006
Location: Where the sky loves the sea

Gaetan 
you need to name the net you want to run the FFT on (for example amp_out) and change your .four command: .four {freq} 9 8 V(amp_out) That will run the FFT over 8 cycles of the node named amp_out and display results for 9 harmonics. Try running the basic simulation for different time periods and seeing if the .four results stay constant. If not then it is probably caused by voltage drift on C14. Try replacing C14 with a voltage source (set it to 0) and see if you get consistent .four results. Discussion of all of the above is on the wiki Common Issues Encountered By New Users  diyAudio see THD measurement and Slanted FFT topics 
14th January 2010, 11:06 AM  #105 
diyAudio Member
Join Date: Apr 2007

Hello
Here is my the parameter that I use. ;ac oct 10 10Hz 10000000Hz ;op .param num_fft_pts 65532 .param freq 20k .param timestep {1/((num_fft_pts1)*freq)} .options plotwinsize=0 .tran 5m Thank Bye Gaetan 
14th January 2010, 11:25 AM  #106 
diyAudio Member
Join Date: Nov 2008
Location: Brazil

Try this:
SINE(0 1 {freq}) (source) .four {freq} V(OUT) .options plotwinsize=0 ;tran 0 2m 0 {timestep} .param timestep {1/((num_fft_pts1)*freq)} .param freq 20k .param num_fft_pts 6550 
14th January 2010, 11:52 AM  #107 
diyAudio Member
Join Date: Apr 2007

Hello
Reading the Common_Issues_Encountered_By_New_Users wiki, it seem that my problem is a Slanted FFT. I did replace c14 with a voltage sources but nothing changed. The image are the circuit before replacing c14 with a voltage sources, the fft are same with and without replacing c14 with a voltage sources. Bye Gaetan Last edited by gaetan8888; 14th January 2010 at 12:01 PM. 
14th January 2010, 01:16 PM  #108 
diyAudio Member
Join Date: Feb 2003
Location: ..

may be slow transient settling  give a start time in the .tran that allows it to settle out
windowing also reduces the settling time effect  try Blackman window .four and assoc params only applies to the legacy numerical output in the error log  not the graphic plot fft  you have to setup the graphic fft length, windowing, ect in the pop up window you can experiment with the fft start, end time in the popup window Last edited by jcx; 14th January 2010 at 01:20 PM. 
15th January 2010, 05:26 AM  #109 
diyAudio Member
Join Date: Dec 2006
Location: Where the sky loves the sea

Run the .tran for a long time (maybe 100m) and find where in the circuit there is DC drift. Since it is a bootstrapped design C9 is another likely suspect.

15th January 2010, 05:47 AM  #110 
diyAudio Member
Join Date: Apr 2007

Hello
I did run the .tran at 200ms At the node C14 and R6 it seem to be the dc drift, I've include an image of the sinewave. Than Bye Gaetan 
Thread Tools  Search this Thread 


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
LTSpice and subcircuits  millwood  Solid State  12  27th April 2011 09:03 AM 
Using LTSpice  gaetan8888  Solid State  6  19th July 2007 12:33 AM 
UcD / LTSpice help  fokker  Class D  94  1st October 2006 01:12 PM 
Things important to be said..helped by Mr. John Mateus to express things.  destroyer X  Solid State  22  31st July 2006 07:21 PM 
Ltspice....  mikeks  Solid State  10  13th June 2004 08:10 PM 
New To Site?  Need Help? 