|
|||||||
| 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 |
|
|
#21 |
|
diyAudio Member
|
Also, look at this page about capacitor distortion. He tries to models capacitance change with LTSpice.
http://www.cliftonlaboratories.com/c...age_change.htm - keantoken |
|
|
|
#22 | |
|
diyAudio Member
Join Date: Dec 2006
|
Quote:
another thing i've run into using LTSpice are amplifier circuits that never resolve, or that error out with "Time Step too small". usually now when i see this with an amplifier circuit, the first thing i double check is whether or not i have an inversion step i missed. when you apply what is supposed to be negative feedback to what you think is the inverting input (but ends up being the noninverting input), the solver will never find a stable operating point. instead it tries to hit a moving target, and finally gives up (after quite a wait, and continuous DEFCON 1 messages). actually i tried to sim something like that now that i have LTSpice 4, and it doesn't seem to want to get confused.... it just gives me an off-the-wall result (2.4e+26 TV spike), but never goes into DEFCON....... |
|
|
|
|
#23 |
|
diyAudio Member
|
You can tick the "skip initial operating point solution" box, but this won't do well for your FFTs without adding some settling time to your simulation.
It turns out I can't (yet) indefinitely edit my first post, but will have to send my revision to moderators. I will do the next update when I have the time. - keantoken |
|
|
|
#24 |
|
diyAudio Member
|
I want to get a bunch of updates together and add them at once, and this includes adding some of my models.
For those watching this this thread, I want to discuss whether my models are good enough to add to the list I will eventually add to the first post. Discussion is here: BJT SPICE Models, reality-check I presently have these models. Please post if you have your own models or know of other user-made models I should add. Andy_C: MJL3281A MJL1302A 2SA1837 2SC4793 Syn08: 2SA1407 2SC3601 2SA1930 2SC5171 Christer: 2SD669 2SB649 - keantoken |
|
|
|
#25 |
|
diyAudio Member
|
On the topic of good FFT's
Not sure if it is something I'm failing to understand, but I usually set up the Transient analysis to start recording after some period of time to allow biasses to stabilize, capacitors to charge etc. I find that you must arrange for the signal to start at zero when you begin recording data to avoid a dirty FFT. This is easily arranged by specifying a time delay for the signal source to start and use this also to establish the start time of transient data recording. For example, define .param Tdelay = 1/F1 where F1 is the signal frequency. In the signal source, usually with me a simple Voltage source (sinusoidal) set it turn on at {Tdelay} and in the transient analysis set the start recording to {Tdelay} I've seen plenty of other people do this so please correct my explanation if it's not correct !
__________________
"The test of the machine is the satisfaction it gives you. There isn't any other test. If the machine produces tranquility it's right. If it disturbs you it's wrong until either the machine or your mind is changed." Robert M Pirsig. |
|
|
|
#26 |
|
diyAudio Member
Join Date: Dec 2006
|
when you do the FFT, you can specify a time range to analyze, so if you know it takes let's say 5mS for a waveform to stabilize you can tell the FFT to use the time range of 5mS to the end of the plot
|
|
|
|
#27 |
|
diyAudio Member
|
I am aware of these tips, thank you for reminding me to add them to my eventual update.
I personally have found using voltage sources as caps to be a better solution; look at it in terms of the logarithmic scale. 5mS of delay might get you a noise floor some decibels lower, but in order to get the same number of decibels lower you will have to use 20mS of delay! The simulation time adds up (I'm "absolutely approximate" on my math here, but you can see the pattern). I want to know how well my circuits really work before I change the design to compensate for simulator errors. This is my personal preference, it won't affect the update. - keantoken |
|
|
|
#28 |
|
diyAudio Member
|
Hi Folks,
I am trying to model a RIAA filter in LTSpice. But I am not getting the results I expect. The curve is pretty close. But I am trying to produce a report in the log. I am trying to show the relative ac voltage difference between the 1Khz reference point and the measured AC voltage at he current step point frequency. Here are the relevant .step and .measure commands and the results which I find puzzling. The measurement for ref is correct. The measurement for fs is correct. But when I try to measure the difference between fs and ref (fs - ref) the answer does not make any sense to me. And ideas you folks have to get the correct answer would be very much appreciated. Code:
.step oct param fac 20 20K 1
.meas AC REF find V(out+,out-) when freq = 1000
.meas AC FS find V(out+,out-) when freq = fac
.meas RESULT param FS - REF
and in the log:
Direct Newton iteration for .op point succeeded.
.step fac=20
.step fac=40
.step fac=80
.step fac=160
.step fac=320
.step fac=640
.step fac=1280
.step fac=2560
.step fac=5120
.step fac=10240
.step fac=20000
Measurement: ref
step v(out+,out-) at
1 (0.0206938dB,131.159°) 1000
2 (0.0206938dB,131.159°) 1000
3 (0.0206938dB,131.159°) 1000
4 (0.0206938dB,131.159°) 1000
5 (0.0206938dB,131.159°) 1000
6 (0.0206938dB,131.159°) 1000
7 (0.0206938dB,131.159°) 1000
8 (0.0206938dB,131.159°) 1000
9 (0.0206938dB,131.159°) 1000
10 (0.0206938dB,131.159°) 1000
11 (0.0206938dB,131.159°) 1000
Measurement: fs
step v(out+,out-) at
1 (19.3631dB,159.807°) 20
2 (17.8642dB,144.625°) 40
3 (14.5555dB,128.718°) 80
4 (9.84162dB,120.591°) 160
5 (5.09813dB,122.76°) 320
6 (1.58234dB,129.662°) 640
7 (-0.795996dB,129.994°) 1280
8 (-3.72349dB,119.763°) 2560
9 (-8.21593dB,106.678°) 5120
10 (-13.7368dB,96.7739°) 10240
11 (-19.4281dB,89.5999°) 20000
Measurement: result
step fs - ref
1 (18.5135dB,163.076°)
2 (16.7128dB,146.578°)
3 (12.753dB,128.154°)
4 (6.55826dB,115.634°)
5 (-1.7234dB,112.474°)
6 (-14.0009dB,122.118°)
7 (-20.7212dB,-37.2088°)
8 (-8.26935dB,-29.3612°)
9 (-3.49641dB,-34.9139°)
10 (-1.50696dB,-40.8994°)
11 (-0.675443dB,-44.4484°)
Date: Sun Sep 27 17:38:17 2009
Total elapsed time: 0.468 seconds.
tnom = 27
temp = 27
method = trap
totiter = 10
traniter = 0
tranpoints = 0
accept = 0
rejected = 0
matrix size = 137
fillins = 264
solver = Normal
Matrix Compiler1: 1286 opcodes
Matrix Compiler2: 16.5 KB object code size
Russ
__________________
Less pulp more juice Twisted Pear Audio. Last edited by Russ White; 27th September 2009 at 10:53 PM. |
|
|
|
#29 |
|
diyAudio Member
|
This is the best place to go for help in LTSpice. This is a starter thread for those having trouble acclimating to LTSpice.
http://tech.groups.yahoo.com/group/LTspice/ To use it, you'll have to register with Yahoo. Anyways, I don't know the solution to your problem. Maybe someone else can help. - keantoken |
|
|
|
#30 |
|
diyAudio Member
|
I found the issue.
It was a silly mistake. I should have been measuring the ratio, not the difference. Cheers! Russ
__________________
Less pulp more juice Twisted Pear Audio. |
|
![]() |
| 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? |