Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Solid State Talk all about solid state amplification.

THD measurement in spice
THD measurement in spice
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
Old 18th August 2011, 11:40 AM   #1
samlo is offline samlo  India
diyAudio Member
Join Date: Aug 2010
Question THD measurement in spice

Hello everybody, i an newbee in audio amp simulation. i am using TINA 8 industrial version spice program. i am learning step by step to use it . i learned lot of things about simulation but i dont know how to measure THD,IMD with spice. i also have LT spice but same problem with it. actually, i want to see how transistor types and bias setting affects THD and i also want to know how accurate it is? kindly help.
  Reply With Quote
Old 18th August 2011, 12:11 PM   #2
Bensen is offline Bensen  Belgium
diyAudio Member
Bensen's Avatar
Join Date: May 2003
Location: Belgium, Limburg
Hi Samlo,

There are lot's of thread's in this forum regarding this issue.

In the attached picture is the way I manage this (a copy from on this forum) a FFT analysis.
These should be written in your LTspice .asc file.

Behind the .four commando is the signal of where you wan't to have the fourrier analysis from. All the parameters between {} are variables.

For you input signal frequency you can use for example the variable {Freq}, this way you only have to change one parameter to have all the rest ok.

Hope I helped you a bit.
Attached Images
File Type: jpg FFT para.JPG (94.2 KB, 221 views)
File Type: jpg FFT para2.JPG (69.1 KB, 211 views)
  Reply With Quote
Old 18th August 2011, 01:56 PM   #3
jcx is offline jcx  United States
diyAudio Member
Join Date: Feb 2003
Location: ..
actually spice always has to interpolate for even sample times so the exact numsamples calculation is wasted

just use a .tran T_maxstep setting small enough to give (lots) more points than the fft

the .four is pretty old - most today like the much greater info from the fft plot that gives the releative amplitudes, distribution in a nice graphical presentation

the Software Tools sub forum has more spice, Ltspice threads
  Reply With Quote
Old 18th August 2011, 08:33 PM   #4
ingenieus is offline ingenieus  South Africa
diyAudio Member
Join Date: Apr 2011
Location: Pretoria
TINA is quite good, but I prefer LTspice. Firstly because it runs well in Wine underLinux (which is how I use it). Secondly, because it is easy to add your own symbols and models. Might be that TINA could do it equally well, but I never progressed that far.

I also tried Pspice and Microcap, but they are only available in demo versions to the financially challenged. The Microcap demo limits you to 50 components. You can get by with that, but sooner or later it will not be enough. The Pspice demo limits you to 10 transistors and that is just ridiculous.

On this topic, is it possible to vary the temperature of transistors in LTspice? Probably just a SPICE directive away, but I still have to figure it out. Maybe I should just read the manual.
  Reply With Quote
Old 18th August 2011, 08:53 PM   #5
Simplex2 is offline Simplex2  France
diyAudio Member
Join Date: Apr 2008
In Tina you have a sptectrum analyzer . It is very easy to mesure distortion or intermodulation with this instrument .

Ajust the range (max level , expected low level(in dB) , min and max Hz ) select blackman convolution and amplitude spectrum .
Wait computation and see .

There is one bug with the oscillator , he is not clean over one decade . It is better to observe only the first decade after fondamental at low level of distortion (blameless) .

The next question is what mean this value in real world ?
  Reply With Quote


THD measurement in spiceHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
THD measurement - how to? okapi Everything Else 18 7th June 2010 01:08 PM
THD and POWER measurement mravlcax Chip Amps 2 2nd May 2007 01:22 AM
P-spice THD JensRasmussen Solid State 10 18th October 2002 05:18 AM

New To Site? Need Help?

All times are GMT. The time now is 01:48 AM.

Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio