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

Administrator
Joined 2007
Paid Member
Pretty much every image in this thread has been done with the snipping tool. Vista onwards had it by default.

The other screen grab mode that can be useful is pressing CTRL and PrtnScr together which copies the contents of the screen to the clipboard. This is useful where the snipping tool doesn't work fully such as the example I posted above. Opening the snipping tool here would close the dropdown box under 'tools', the very thing that we wanted to capture.
 
Pretty much every image in this thread has been done with the snipping tool. Vista onwards had it by default.

The other screen grab mode that can be useful is pressing CTRL and PrtnScr together which copies the contents of the screen to the clipboard. This is useful where the snipping tool doesn't work fully such as the example I posted above. Opening the snipping tool here would close the dropdown box under 'tools', the very thing that we wanted to capture.

Yes, it loses focus. Linux Mint KDE's snipping tool KSnapshot has a delay setting which works around that. :) BTW the copy to clipboard function under tools is available in LTspice running under wine on Linux as seen in the KSnapshot below:
 

Attachments

  • snapshot7.png
    snapshot7.png
    84.3 KB · Views: 230
Just another Moderator
Joined 2003
Paid Member
Does this "discovery" affect the way you suggested we organise our files?

I am lost when trying to save and retrieve LT files.
There are some that I can never find, I don't know where LT saves them.
Search in Win7 does not work like it did in very old Win versions.

Hi Andrew, LT Spice by default will try to save the files under the LT Spice instalation directory (in program files, or program files (x86)) This is a bad thing on Windows7 and higher (perhaps even vista).

If you run the program in admin mode (like when you want to run the auto update) it will successfully save the files to the program files directory. If however you run the program the normal way (without admin privileges) Windows "protects" you and saves the files to a safe place, and NOT to the program files directory. This can be VERY confusing as you can still go to the program files directory to load the file but it is actually getting it from somewhere else.

This somewhere else is generally (under windows7) under c:\users\your_user_name\appdata\roaming\some directory related to LTC

I ended up overriding the default LTspice installation directory to get around this and instead installed it to c:\tony\ltspice

Tony.
 
Parameter sweep of Tian stability analysis

I want to run a sweep where a Tian stability analysis is performed at multiple points in the voltage swing of an amp. I'm using the technique in LoopGain2.asc in LTspice/examples/educational.

I tried this:
.step param dcin list -60 -30 0 30 60 ;this steps the output across its swing
.step param prb list -1 1 ;these are the 2 runs needed by the Tian analysis

What is the order of nesting in nested parameter sweeps? LTspiceWiki was unhelpful. Does the above example run the 2nd .step 5 times, or does it run the 1st .step 2 times?

Once I know the answer to that, I think I can make multiple copies of the Tian function in my plot defs file, one for each of the 5 dcin points.

Help? Is anyone else doing this? Is there an easier way.

--Russell
 
managing additional steps when the probe uses the calculation with the @1, @2... is a total pain

rather than solve that problem I use the "simple Middlebrook" Vsource only probe
with proper selection of loop cut point you can have very good accuracy in commonly structured feedback circuits

just run a comparison with the Tian probe to see if the reverse conduction errors are worth the complication
 
jcx,
Yes, that's the pain. But the loops I'm analyzing are the CFP pairs of a complementary output stage, to avoid the multi-MHz fuzz oscillation those often have. So reverse conduction is not only a problem, it's how the circuit works.

I'm finding that a Miller cap across the power device, with some R in series, is quite effective, but I want to expand and automate my analysis to the full voltage swing of the amp.

I'll come up with a methodology, but I'm impatient, and I'm new to LTspice. Spoiled by Cadence & Spectre at work, but this is for home/hobby projects, so I can't use that.
 
Open the windows-explorer, go to the folder 'C:\Users\<user>' type '*.asc' in the search box. It will produce a list of all LTspice related files. One other location is 'C:\Program Files (x86)\LTC'.
This is what I used to use in the OLD versions of dos and win.
*.asc
But it does not work with the modern versions of win explorer search.
It often returns nothing found.
 
What is the order of nesting in nested parameter sweeps? LTspiceWiki was unhelpful. Does the above example run the 2nd .step 5 times, or does it run the 1st .step 2 times?
In nested stepping, assuming all steps are within a single directive or command, the earlier variable is stepped while the following are held constant - so, in your example prb is static while dcin is stepped through all values, then prb value is stepped, etc - that's the order of the runs.

A simple way to confirm is to do a nested stepping, and then on the waveform click on a trace label to attach a cursor; use Up and Down keys to step through the runs, and right click the cursor to see which numbered run you have, with the corresponding variable values.
 
Hello Mooly. I hope that you [and hopefully others too] find time to instruct beginners in using Mosfets and Jfets in LTSpice models of audio amplifiers etc. Fortunately, there are many example schematics of simple diy amps from Mr. Pass for this valuable instruction.

Thank you, and best regards..
 
Nested .step param

Thanks, fas42.
And you just taught me how to step through multiple runs with the cursor, which I've been trying to figure out. I only downloaded LTspice last week, and it's the Mac version, which has most of the GUI buttons missing. But full function through keyboard shortcuts, it looks like.

Best Regards,
Russell

In nested stepping, assuming all steps are within a single directive or command, the earlier variable is stepped while the following are held constant - so, in your example prb is static while dcin is stepped through all values, then prb value is stepped, etc - that's the order of the runs.

A simple way to confirm is to do a nested stepping, and then on the waveform click on a trace label to attach a cursor; use Up and Down keys to step through the runs, and right click the cursor to see which numbered run you have, with the corresponding variable values.
 
Administrator
Joined 2007
Paid Member
Hello Mooly. I hope that you [and hopefully others too] find time to instruct beginners in using Mosfets and Jfets in LTSpice models of audio amplifiers etc. Fortunately, there are many example schematics of simple diy amps from Mr. Pass for this valuable instruction.

Thank you, and best regards..

There are quite a few models for N and P channel JFET's and power FET's already included in LT as shown here. Working with other devices such as Lateral Fets means getting hold of and adding them in the same way as we have covered earlier.
 

Attachments

  • Capture6.PNG
    Capture6.PNG
    21.9 KB · Views: 227
Tian et al Stability Analysis against output swing

OK, I think I've made this work. Multiple Tian stability plots across the signal swing. Thanks to jcx and fas42 for assistance.

I have a 250W CFP output stage I'm working on. I wanted to break the CFB local loop to check GM & PM at several points on the output swing, from -80V to +80V. Here's what I did.

Nested .step sweeps:
.param dcin=0 prb=0
.ac dec 100 1 1e9
.step param prb list -1 1 ; Tian loopbreak probe V1 and I1; set prb=0 to turn off probe
.step param dcin list -78 -40 0 40 78 ; run Tian loopbreak at each of these voltages

One .func in the plot.defs file for each of the dcin values:
.func stb1() -1/(1-1/(2*(I(VI)@1*V(OUT)@2-V(OUT)@1*I(VI)@2)+V(OUT)@1+I(VI)@2))

.func stb2() -1/(1-1/(2*(I(VI)@3*V(OUT)@4-V(OUT)@3*I(VI)@4)+V(OUT)@3+I(VI)@4))

.func stb3() -1/(1-1/(2*(I(VI)@5*V(OUT)@6-V(OUT)@5*I(VI)@6)+V(OUT)@5+I(VI)@6))

.func stb4() -1/(1-1/(2*(I(VI)@7*V(OUT)@8-V(OUT)@7*I(VI)@8)+V(OUT)@7+I(VI)@8))

.func stb5() -1/(1-1/(2*(I(VI)@9*V(OUT)@10-V(OUT)@9*I(VI)@10)+V(OUT)@9+I(VI)@10))

I think I'll start a thread on this, so others can see it, cause it's useful.
Here's the schematic and plots for your viewing pleasure:
 

Attachments

  • OutputStage.png
    OutputStage.png
    25 KB · Views: 231
  • Screen Shot 2015-03-31 at 3.09.40 AM.png
    Screen Shot 2015-03-31 at 3.09.40 AM.png
    364.6 KB · Views: 217
This is what I used to use in the OLD versions of dos and win.
*.asc
But it does not work with the modern versions of win explorer search.
It often returns nothing found.

Something must be wrong. It works fine on my Windows machines (currently Windows 7, 8 and 10 :)).

Try/check this:
How to Add a Folder to the Windows 7 File Index: 4 Steps
Be sure that 'C:\Users\<user>' and 'C:\Program Files (x86)\LTC' are both indexed.

Make sure that you are a owner of the 'C:\Program Files (x86)\LTC' folder, see:
https://technet.microsoft.com/en-us/library/cc753659.aspx?f=255&MSPPError=-2147217396
 
One more helpful addition to your system.

Go to the parent folder of your folder where you store your schematics.
For me that is 'C:\Users\<user>' my schematics folder is 'C:\Users\<user>\Schematics'

From the list of folder names in the folder 'C:\Users\<user>' select, using the right mouse button, the folder 'C:\Users\<user>\Schematics'. Then drag this folder to the folder 'C:\Users\<user>'. When you release the right mouse button, the system will popup a list of options, select 'create shortcut'.

Now you have a shortcut, named 'Electronics - Shortcut' in the 'C:\Users\<user>' folder. Next rename the shortcut to '@ Electronics'. This will help a lot in recognizing your shortcut and it will always sit on top of the list (when alphabetically sorted) and when you have more then one shortcut they all stay together.

Next copy the shortcut to the folder 'C:\Program Files (x86)\LTC\LTspiceIV', and any other folder of your liking :).

Next time,when you create a new schematic, and LTspice asks you to safe it, you can use the shortcut from the 'safe-as box' to 'travel'/'transport' yourself to the folder where you normally safe your schematics.

This, obviously, can be done with any folder, I find using shortcuts to 'travel' around my system very useful, most probably you will like it also :)