
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 
19th March 2009, 06:31 PM  #11 
diyAudio Member
Join Date: Mar 2009

Hi Elvee,
Its very glad to hear from you......Our output expression is Iout=Id(M12)Id(M13)....so how to see the thd for this output.....because .four does not support this expression.... 
19th March 2009, 08:47 PM  #12 
diyAudio Member
Join Date: Feb 2003
Location: ..

a few things
this is a multiplier circuit so the appropriate freq for the .four is the fundamental of the output  which is 2x the input .tran should have step size Tstep and max step dTmax much smaller than the period of anything going on in the circuit to give good resolution and "realistic" distortion #  I changed them to 10nS an Arbitrary Behavioral source can be used for waveform arithmetic after you Simulate you can rt click in the plot area add trace  shows available vars or even fft  shows the very low 1 MHz "leakage" in the output modded lines: .Tran 10ns 100us 0ms 10ns BI1 0 0 I=(Id(M12)Id(M13)) .Four 2Meghz I(BI1) Error Log: Circuit: ** Gilbert Cell ** Ignoring BSIM parameter XL Ignoring BSIM parameter XW Ignoring BSIM parameter XL Ignoring BSIM parameter XW Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. .step a=1 Direct Newton iteration for .op point succeeded. Fourier components of I(bi1) DC component:0.00022244 Harmonic Frequency Fourier Normalized Phase Normalized Number [Hz] Component Component [degree] Phase [deg] 1 2.000e+06 5.348e05 1.000e+00 58.06° 0.00° 2 4.000e+06 1.002e06 1.873e02 50.24° 7.81° 3 6.000e+06 2.637e07 4.930e03 81.36° 139.42° 4 8.000e+06 1.029e07 1.924e03 83.78° 25.72° 5 1.000e+07 8.911e08 1.666e03 153.70° 95.64° 6 1.200e+07 1.154e07 2.158e03 57.77° 115.82° 7 1.400e+07 1.058e07 1.979e03 82.26° 24.20° 8 1.600e+07 3.886e08 7.267e04 133.01° 74.95° 9 1.800e+07 4.831e08 9.033e04 116.79° 174.85° Total Harmonic Distortion: 1.979001% .step a=2 Fourier components of I(bi1) DC component:0.000237197 Harmonic Frequency Fourier Normalized Phase Normalized Number [Hz] Component Component [degree] Phase [deg] 1 2.000e+06 6.595e05 1.000e+00 61.12° 0.00° 2 4.000e+06 2.791e06 4.232e02 58.87° 2.25° 3 6.000e+06 6.872e07 1.042e02 136.65° 197.77° 4 8.000e+06 3.385e07 5.132e03 55.22° 116.35° 5 1.000e+07 7.404e08 1.123e03 4.35° 56.78° 6 1.200e+07 2.470e07 3.745e03 118.76° 57.64° 7 1.400e+07 7.445e08 1.129e03 128.27° 189.39° 8 1.600e+07 9.548e08 1.448e03 95.52° 156.64° 9 1.800e+07 3.556e08 5.392e04 0.71° 61.83° Total Harmonic Distortion: 4.409884% .step a=3 Fourier components of I(bi1) DC component:0.000260279 Harmonic Frequency Fourier Normalized Phase Normalized Number [Hz] Component Component [degree] Phase [deg] 1 2.000e+06 8.517e05 1.000e+00 63.18° 0.00° 2 4.000e+06 5.828e06 6.842e02 56.42° 6.76° 3 6.000e+06 9.696e07 1.138e02 158.36° 221.55° 4 8.000e+06 4.044e07 4.748e03 118.82° 182.01° 5 1.000e+07 3.679e07 4.320e03 49.24° 112.43° 6 1.200e+07 6.515e08 7.650e04 66.15° 129.33° 7 1.400e+07 1.986e07 2.331e03 92.63° 29.45° 8 1.600e+07 1.101e07 1.293e03 127.05° 63.86° 9 1.800e+07 6.230e08 7.315e04 144.66° 207.85° Total Harmonic Distortion: 6.972069% .step a=4 Fourier components of I(bi1) DC component:0.00029115 Harmonic Frequency Fourier Normalized Phase Normalized Number [Hz] Component Component [degree] Phase [deg] 1 2.000e+06 1.106e04 1.000e+00 63.98° 0.00° 2 4.000e+06 1.020e05 9.228e02 56.00° 7.98° 3 6.000e+06 1.204e06 1.089e02 176.98° 240.97° 4 8.000e+06 7.661e07 6.928e03 146.62° 210.60° 5 1.000e+07 2.604e07 2.355e03 70.50° 134.48° 6 1.200e+07 3.601e07 3.256e03 60.43° 124.41° 7 1.400e+07 5.367e08 4.853e04 4.16° 68.15° 8 1.600e+07 1.433e07 1.296e03 81.93° 17.95° 9 1.800e+07 1.311e07 1.186e03 112.34° 48.36° Total Harmonic Distortion: 9.327891% Date: Thu Mar 19 16:45:49 2009 Total elapsed time: 17.004 seconds. tnom = 27 temp = 27 method = modified trap totiter = 37041 traniter = 37032 tranpoints = 13916 accept = 12375 rejected = 1541 matrix size = 28 fillins = 8 solver = Normal Matrix Compiler1: 1.72 KB object code size 2.2/1.8/[1.4] Matrix Compiler2: off [1.9]/2.0/2.1 
21st March 2009, 07:12 AM  #13 
diyAudio Member
Join Date: Mar 2009

Hi JcX,
Thanks for all that useful points...I am not aware of these things....One more point.....after simulating with these conditions i am getting THD of around 12% ......so i want to know.....what are the limits on the input voltage and frequency.....for simulating THD......and also what are the ways to reduce it......??I am attaching the IEEE paper which i am going to simulate....hope to see ur reply soon... 
8th April 2009, 07:19 PM  #14 
diyAudio Member
Join Date: Mar 2009

Cmos gilbert cell multiplier.
Hi all,
I want to perform pole zero analysis of my circuit....which is having two voltage inputs(differential) and current output(single ended)...in LTSpice...what are the commands.. please help..... Thanks in advance... 
12th December 2009, 12:26 PM  #15 
diyAudio Member
Join Date: Mar 2007

So, I have the THD simulations working for a frequency sweep and I have two questions:
1. Is it possible to add in a spice operative so that the transient plot doesn't graph? It's nice to see the multiple sine waves float across the screen, but I think it'd be faster without them..... 2. Is it possible to add a spice operative for windowing functions? I think that the fourier would be more accurate if there was a way to window the transient graph. I guess I could always increase the number of points of the FFT, or only do analysis on frequencies that would have harmonics that lie in a complete cycle within the transient, but it'd be nice to window it so I didn't have to worry as much. Thanks all. This is a very clever group of people and I learn a lot from here. 
27th December 2009, 09:34 PM  #16 
diyAudio Member
Join Date: Jul 2005
Location: D55629 Schwarzerden

in this case this thread could be of interest:
Transistor modeling  how do I generate PSpice Parameter ? 
27th December 2009, 09:49 PM  #17 
diyAudio Member

__________________
The Kmultiplier rail filter! = The Simple Kuartlotron Superbuffer! Need something built, repaired or modded? PM me and ask what I can do! 
6th November 2013, 12:10 AM  #18 
diyAudio Member
Join Date: Nov 2007
Location: Dallas

Coherent sampling  Wikipedia, the free encyclopedia
This has turned out to be important for me at work, so just passing it on. I think it might help LTSPice produce FFTs that don't look quite so unreal. Especially with rectangular windowing... 
6th November 2013, 06:30 PM  #19 
diyAudio Member

off topic but wrt LTSpice,
When running analysis with a DN2540, using the supertex.lib file from supertex I get a long list of the following error: Stray ".ends" card: .ends quote marks inclusive. This looks like it is complaining about a .ends following a model definition. However, I can find no .ends which is not associated with a .model line. 
6th November 2013, 07:04 PM  #20 
diyAudio Member
Join Date: Feb 2003
Location: ..

there is a sticky spice simulation thread Spice simulation
and probably 1/2 dozen better choices from diyAudio  Search Results for a LTspice thread but I suppose this one could grow into its title 
Thread Tools  Search this Thread 


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Help with LT Spice  Bonsai  Solid State  9  5th September 2008 12:32 AM 
New to SPICE  WithTarragon  Pass Labs  2  6th June 2008 06:32 PM 
Free Spice Or Cheap Spice SimulatorWhere To Start?  kelticwizard  Everything Else  29  15th February 2007 01:38 AM 
1 800 Go Spice  EternaLightWith  Parts  9  21st May 2003 03:51 AM 
Pspice THD  JensRasmussen  Solid State  10  18th October 2002 05:18 AM 
New To Site?  Need Help? 