Installing and using LTspice IV (now including LTXVII), From beginner to advanced

In Linux my calculator allows me to enter ** instead of ^. I think this is great feature and I hope some pedant never removes it as it makes using the calculator so much faster. I can do exponentiation all from the numpad. If I want a square root I can just do

10**0.5 = sqrt(10)

If I want to convert peak to RMS I just do

10V*2**-0.5 = 10V * 1/sqrt(2)

If I want to do the reciprocal, instead of 1/10 I do

10**-1 = 1/10

I no longer have to use so many bloody parenthesis or use the keyboard to do a square root.

Oh and also, to convert db to integer I do

1.122**-120db = 20 * log(-120db) (to the 2nd decimal place)

Since LTspice also uses **, I can move directly from the calculator to LTspice.
 
Jan and I were approaching calculations from different angles. Here's a modification of Jan's to go with post 13 I think

SINE(0 0.1 {f} 0 0 0 {totalcyc})

.param dlycyc=920 numcyc=80 FFT=262144
.param f=4000
.param totalcyc=dlycyc+numcyc
.param simtime=numcyc/f+dlytime
.param dlytime=dlycyc/f
.param timestep=(simtime-dlytime)/FFT
.tran 0 {simtime} {dlytime} {timestep}

where if not obvious

totalcyc = cycle total
numcyc = cycles to sample
dlycyc = cycles before analysis
simtime = total sim time
timestep = time step
dlytime = time before analysis

Lokks about right?

O, is it impossible to delay .ac analysis sweeps? I'm having trouble with sims of a known working tube preamp sim
 
Maybe it will help if you do an .tran analysis and a .savebias probably the .restbias command will be effective when running a subsequent .ac analysis. No guaranties from me though :)

Syntax: .savebias <filename> [internal]
+ [temp=<value>] [time=<value> [repeat]] [step=<value>]
+ [DC1=<value>] [DC2=<value>] [DC3=<value>]

This command writes a text file to disk that is reloaded with a .loadbias command in a subsequent simulation. If you have a circuit that has a difficult-to-solve DC operating point, you can save that solution to disk so that the next analysis can save time finding the DC solution before proceeding to the rest of the simulation.

The keyword "internal" can be added to indicate that the internal nodes of some devices should also be kept so that a more complete version of the DC solution is kept.

If you want to save a particular DC operating point from a .tran analysis, you can give specify a time. The first solved time point after the stipulated time will be written. The modifier "repeat" will cause the DC solution to be written after every period specified by this time. The file will contain only the most recently solved DC point. DC1, DC2, and DC3 can be given to extract a single operating point from .dc sweep analysis.

The savebias command writes a text file in the form of a .nodeset command. Note that nodeset statements are only recommendations of the solution. That is, the solver will start iterating the solution with the node voltages given in the nodeset statements, but will continue iterating until it's satisfied that the solution is valid. If you want to restart a .tran solution from the DC operating point, you can edit the file from a .nodeset to a .ic to try to coercive the solver to start from this DC state.

Since the integration state of all the circuit reactances isn't saved in the .savebias file, success with this technique varies.
 
Last edited:
What i was troubleshooting was just newbie stuff, and the classic EE issue of when one small thing is off everything is. So I isolated my ef86 ckt, made sure small signal inout was 1, put the ef86 duncan model in the asc file and bingo. finally some love. the step cmd is darn tooting' cool!

funny that the .include didn't work
 

Attachments

  • 39476082-8224-444A-8DE8-F1905B5F9012.png
    39476082-8224-444A-8DE8-F1905B5F9012.png
    149.4 KB · Views: 103
Keep in mind Osvaldo, you may have to change all the "^" to "**" for LTSPICE. it took me a week of head banging to finally ask about that.

I really want to thank Molly and KEANTOKEN for giving a solid guide to do some fairly advanced things with just a few tutorials. I’m working on a power supply with the suggestions here and that mosfet with squarewave and it seems pretty unforgiving. I think if I had the circuit in the real world I would probably “get away” with designs that failed that test. I used a simple sine wave to speed up texts for a bit and some passed then failed with square wave. I learned the hard way that that I need to switch back and forth from AC to trans analysis. I got so tunnel vision with AC tests with impedance results that would never be stable over time.

Is there any way to test impedance in .trans mode?

Thanks again guys. You rock!