|
|||||||
| Home | Forums | Rules | Articles | 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 |
|
|
#1 |
|
Account Disabled
Join Date: Mar 2003
Location: Vancouver
|
|
|
|
|
|
#2 |
|
Electrons are yellow and more is better!
diyAudio Member
|
You can do it manualy.
SQR((2nd)^2 + (3rd)^2 + (4th)^2 + etc), geometric addition Take the result and compare it with 1 kHz, the fundamental 2nd = first harmonics, 2 kHz 3rd = second harmonics, 3 kHz
__________________
/Per-Anders (my first name) or P-A as my friends call me |
|
|
|
|
#3 | |
|
diyAudio Member
Join Date: Oct 2002
Location: Croatia
|
Quote:
".......The fundamental frequency is alternatively called the first harmonic......" 2nd=second, etc. Regards |
|
|
|
|
|
#4 |
|
diyAudio Member
Join Date: Jun 2002
Location: Serbia
|
Prune,
Enter dot four command using “SPICE directive” button (keyboard shortcut is 'S'). Should look like: .four 1kHz V(out) (for the harmonics of 1kHz at the point marked as out). Then you can see the THD and the levels of individual harmonics if you run the transient analysis and check log file under View > Spice Error Log. LT SwCAD by default computes for the first 9 harmonics. You can define the number of harmonics you are interested for as well. Then the line should look like: .four 1kHz 4 V(out) (assuming you are interested for the first 4 harmonics only) Pedja |
|
|
|
|
#5 |
|
diyAudio Member
Join Date: Jun 2002
Location: Left Coast
|
You also need to click on "Tools", then on "Control Pannel", then on "Compression". Then uncheck the boxes, the calculation doesn't give reasonable values when applied to compressed data.
Next run the tansient analysis, then click on "View" while the schematic window is selected, then click on "Spice Error Log" and scroll down until you find what you are looking for. Note that the frequency specified in the ".four" directive must be the same as specified in your signal source when you run the transiient. If you forget and change only one you will get spurious (usually dramaticly so) results. I've read on the LT spice forum that you get more accurate results if you select "time stop" and "maximum time step" such that the transient spans a whole number of cycles, i.e., no fractional cycles. I've found 5 cycles are enough to get what I want to know but a few more might help. Some transient waveforms take a while to reach a steady state, such as when a cap has to charge before the pattern settles down. In this case you will need to specify a start time after the steady state is obtained. Finally, be aware that the THD figures you will get from circuit you actually construct will not be as good as what you see in LT Spice. Thus "fine tunning" your circuit to get the last .0005% THD out may be educational and entertaining but unlikely to be of any significance when you actually construct the circuit. |
|
|
|
|
#6 |
|
diyAudio Member
|
So I’m a bit worried here, since I got
Total Harmonic Distortion: -1.#IND00% with the universal opamp, and then Total Harmonic Distortion: 579.678388% with one of the LT opamps. is there a way to import someone else's opamps since I’m not familiar with LT's products. |
|
|
|
|
#7 | |
|
Electrons are yellow and more is better!
diyAudio Member
|
Quote:
__________________
/Per-Anders (my first name) or P-A as my friends call me |
|
|
|
|
|
#8 |
|
diyAudio Member
Join Date: Jun 2002
Location: Left Coast
|
"So I’m a bit worried here, since I got
Total Harmonic Distortion: -1.#IND00% with the universal opamp, and then Total Harmonic Distortion: 579.678388% with one of the LT opamps. is there a way to import someone else's opamps since I’m not familiar with LT's products." I think you need to add code to the universal op amp. Regarding the other - that sound like what you get when the freq specified in the .four statement is different from the freq specified in the transient analysis. |
|
|
|
|
#9 |
|
diyAudio Member
Join Date: Mar 2009
|
Hi all,
I am trying to calculate the THD of the output current in Ltspice......(Id(M12)-Id(M13)).....but everytime getting a message that....the current is not present in data....I am attaching the netlist....PLz help.. |
|
|
|
|
#10 |
|
diyAudio Member
Join Date: Sep 2006
|
Why do you want to do it manually? It is much simpler to use the command: .four 1K I(out)
(view results in Spice Error Log) |
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with LT Spice | Bonsai | Solid State | 9 | 5th September 2008 01:32 AM |
| New to SPICE | WithTarragon | Pass Labs | 2 | 6th June 2008 07:32 PM |
| Free Spice Or Cheap Spice Simulator-Where To Start? | kelticwizard | Everything Else | 29 | 15th February 2007 02:38 AM |
| 1- 800- Go- Spice | EternaLightWith | Parts | 9 | 21st May 2003 04:51 AM |
| P-spice THD | JensRasmussen | Solid State | 10 | 18th October 2002 06:18 AM |
| New To Site? | Need Help? |
| Page generated in 0.10686 seconds (85.00% PHP - 15.00% MySQL) with 11 queries |