Qs. about LTSwitcher CAD

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi guys,

I have a few qustions about LTSwitcher CAD:

1) How to performe a squarewave/sawwave response from amp circuit, I mean how to define input pulse voltage source (Vinitial, Von, Tdeley, Trise, Tfall, Ton, Tperiod, Ncycles) for 100Hz, 1Khz, 10Khz... and 10mV, 100mV, 1V... input amplitude

2) Is it possible to wieu distortion vs frequency, distortion vs output power, and if it is, how?

3) How to get "accurate" reading for output impedance from transfer analysis, is it OK if I place spice directive .tf V(Out) V1?

Thanks, a
 
1) I don´t have the LTSpice right at hand now but i remember that the pulse function of the voltage source had some problems with accepting zero values and gave unpredictable results with them. You can use 0.000... ...00001 for example, just do not use zero.

Then, if i remember right, again, Tperiod should be = (Trise + Tfall + Ton) * 2, which is quite logical. No zero values! Set Vinitial and Von respectivily and Ncycles high enough to give useful readings when voltages have adjusted. (I use at least 0.5 delay before viewing simulation results - note that i do not mean the delay in pulse function now.)

2) Take a look at .step command, it should get you started.

I hope i was able to help you at least a bit,

Teemu K
 
LtSpice is really great but it doesn't do harmonic distortion sweeps, you can collect the points for drawing such a graph from the .four output in the log file by finely stepping the frequency or input amplitude, I have written a VBA macro in Word to extract a matrix from the .four log file text results and passed the data to mathcad for plotting (for a completely different use, I wanted a "describing funcition" plot of the fundamental of a clipped ampifier output as a freq, amplitude surface)


THD really throws away too much valuable information for me to worry about LtSpice lacking a THD sweep

Output Z is easily tested via a active current source load - .tran analysis are more realistic so fine stepping of your current source frequency or ampitude is the best spice "measurement" technique, I avoid nearly all .ac or other linearization based analysis (like tf)

I have posted a number of example sims here, most with LtSpice source files, try searching

by user name: jcx
and optionally containing these words: ltspice swcad sim asc
 
Performing an FFT analysis with LTspice goes like this: First make a transient analysis, it should popup a window with a waveform in U, I or P/ t graph. Right click the graph and select FFT from the menu. Select which node you want to plot, (note that in the opening menu you can also overwrite the node with your own plot function). After this another window will open to show the spectrum in a dB / f graph. The bigger the time for transient analysis is (more samples) the more accurate the FFT analysis will be.

I still haven't found an option that would calculate the average THD ratio manually though.

Teemu K
 
One Q about FFT analysis : if i take a voltage source , set it at 1K @ 1V.
"-" of the source is grounded , and i perform a FFT analysis of "+" of it.
I get very strange spectrum analysis with badly distorted signal.Why ?
 

Attachments

  • test.png
    test.png
    21.2 KB · Views: 215
Hi Bazukaz,

Set transient analysis like this ;tran 0 100m 0 1u and signal source like SINE(0 0.1 1K) then performe FFT, it should be much better. Don't forgett to switch off compression in Tools-> Control Panel-> Compression (just click over 3 green marks every time you start LTSwitcher CAD!):smash:

Best, a
 
learning to search would have been more useful in the long run

http://www.diyaudio.com/forums/sear...d=291956&sortby=lastpost&sortorder=descending

from searching
by user name: jcx
containing words: asc ltspice
show as posts

if you just want pictures:

http://www.diyaudio.com/forums/sear...d=291962&sortby=lastpost&sortorder=descending

many of these have the working source LtSpice .asc circuit files attached

admittedly you couldn't expect ot know photobucket is my image server without a little poking around in the html msg source - which is how I found out about photobucket free image hosting -form other members image address tags

I'm certainly not the only lt/spice user here either - you can find lots of good info that you want Right Now by Searching rather than waiting for help
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.