Author Topic: Spice/simulation tools  (Read 3743 times)

0 Members and 1 Guest are viewing this topic.

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: gb
Spice/simulation tools
« on: December 05, 2019, 02:49:23 pm »
Hi,
it has been long time since I played with analog simulation. I want to start again and choose the ideal one for me... 1) quick and simple to learn and use 2) availability of most component models (not sure if there are more than one SPICE types of component models or if all models work with all simulation tools)

The ones I'm looking at are:
1) Altium
2) LTSpice
3) others you might suggest?

Thank you in advance for any feedback :)
« Last Edit: December 05, 2019, 04:39:48 pm by ricko_uk »
 

Offline Pseudobyte

  • Frequent Contributor
  • **
  • Posts: 293
  • Country: us
  • Embedded Systems Engineer / PCB Designer
Re: Spice/simulation comparison
« Reply #1 on: December 05, 2019, 04:05:43 pm »
You really cannot go wrong with LTSpice. I also use Qucs for s parameter type simulations.
“They Don’t Think It Be Like It Is, But It Do”
 
The following users thanked this post: ricko_uk

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: gb
Re: Spice/simulation comparison
« Reply #2 on: December 05, 2019, 04:35:54 pm »
where can I find a very simple primer for both?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22377
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spice/simulation tools
« Reply #3 on: December 05, 2019, 04:53:23 pm »
Altium because you already have/use it..?

Models are loaded in the, well, model section of a SCH part; some built-in libraries come with these, and you can load them (in the project, or installed libraries) as you see fit.  Also, if you create new .mdl or .ckt, by default, it gets added to the current project, thus making it available to schematic parts.

Anyway, Altium's documentation on this is straightforward, at least for getting started.  It's not well explored or developed or maintained, as far as I can tell it's just about been forgotten since 2009, if not earlier... but it is still usable.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: gb
Re: Spice/simulation tools
« Reply #4 on: December 05, 2019, 05:21:44 pm »
Thank you Tim, :)
I have a license of Altium 2013. I am thinking of upgrading to the latest version but not sure if they fully support simulation and you also say the documentaiton has not been well maintained.

Do you know if Altium:
1) puts decent effort in still developing it? If I ask them they obviously say yes :)
2) they continually keep adding models or do so only on customers request (i.e. I would have to buy support package too)?
3) most important, how difficult is it for me to create a Spice model to use in Altium (if the manufacturer already supplies some sort of spice model)?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22377
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Spice/simulation tools
« Reply #5 on: December 05, 2019, 06:21:07 pm »
1. Seemingly a little.  I've had a bug or two in this area flagged as "fixed".  Don't know if that's just token patching or real maintenance.  Anyway, they haven't removed it, it's fine.
2. Don't know if Vault items ever have SPICE.  But I only ever look in there for models (SCH/PCB) for big annoying things, that aren't practical to simulate anyway so I don't expect them to have models.
3. Most I can think is about five steps:

0. You've already downloaded the file, or copied it from a datasheet, or whatever.
1. Rename to .mdl (contains .MODEL statements) or .ckt (.SUBCKTs)
2. Make excerpts if needed (Altium seems to have trouble parsing enormous libraries; search to find desired MODEL/SUBCKT, copy relevant matter into new file, save)
3. Load file into project or whatever
4. Add model to part
5. Run the simulation, or keep adding models or whatever, you're on your own at this point.

Again, this stuff is in the docs (well, not #2).  Have you not looked at the documentation for the product you own?  Get simulating already. Go! ::) ;D

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: ricko_uk

Offline chrisl

  • Regular Contributor
  • *
  • Posts: 90
  • Country: us
Re: Spice/simulation tools
« Reply #6 on: December 06, 2019, 07:27:02 am »
Micro-cap from Spectrum Software
http://www.spectrum-soft.com/download/download.shtm
No license required.
 
The following users thanked this post: thm_w, ricko_uk

Offline ricko_ukTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: gb
Re: Spice/simulation tools
« Reply #7 on: December 06, 2019, 02:31:45 pm »
How precise/reliable is it? I watched a video just now and it looks a bit basic. I also couldn't fine one showing full simulation on graph output (i.e. time domain analisys/output). What about the component libraries? Does it have a large library of coponents for simulation (ICs, etc)?
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7107
  • Country: ca
  • Non-expert
Re: Spice/simulation tools
« Reply #8 on: December 07, 2019, 01:18:38 am »
How precise/reliable is it? I watched a video just now and it looks a bit basic. I also couldn't fine one showing full simulation on graph output (i.e. time domain analisys/output). What about the component libraries? Does it have a large library of coponents for simulation (ICs, etc)?

Download it and try it out, the component library is huge, there are many sample simulations.
I prefer it over ltspice, unless you want to sim a specific LT component.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: ricko_uk

Offline CadenceAE

  • Contributor
  • Posts: 15
  • Country: us
Re: Spice/simulation tools
« Reply #9 on: December 07, 2019, 02:57:01 pm »
you should also consider PSpice

Www.pspice.com.

It offers a free trial, which if your only doing small circuits, maybe sufficient for your needs.

-More models than any of the other solutions being looked at. (LT spice kinda forces you to use their devices only)
-A mature and robust solution
-Used professionally by many fortune 500 companies
-Built in Spice and analog training
-Advanced analysis like Monty Carlo, optimizer, smoke
-Built in integration with TI webbench
-Integration with Matlab for system simulatoin
-Supports mixed signal
 
The following users thanked this post: ricko_uk

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: Spice/simulation tools
« Reply #10 on: December 08, 2019, 10:23:49 am »
you should also consider PSpice

Www.pspice.com.

It offers a free trial, which if your only doing small circuits, maybe sufficient for your needs.

-More models than any of the other solutions being looked at. (LT spice kinda forces you to use their devices only)
-A mature and robust solution
(..)

TRUE. It was the best option due to large "spice" based compat.
and having large pspice manufact.  published libs.

No longer the best option since the ngspice
  http://ngspice.sourceforge.net/

is now mature enough to reliable simulation with advantages:
- it is PSPICE fully compatible
- it is now VDMOS (aka LTSpice) fully compatible
- it is stable and backwards all compatible with spice itself
 (programmable, intrinsic syntax and other goodies)

FREE  open source - no royalties no  crappy deals
You have a more or less front end in KiCAD.

However IHMO - all front ends lack the programmable advantage od SPICE.

so.. indeed SPICE scripts are the bottom line
no longer the fancy "UIs interface."

Unfortunately digital simulation is not trivial and not easily done

Nevertheless I have myself crafted some fancy toys on that.
Some shots attached - pure spice.

Reagrds
Paul
 
The following users thanked this post: ricko_uk

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15285
  • Country: fr
Re: Spice/simulation tools
« Reply #11 on: December 08, 2019, 06:02:27 pm »
I also recommend ngspice. Not really for someone looking for just point-and-click software, though, IMO. (Although KiCad now integrates it, but haven't tried a lot.)
LTSpice is usually much faster though, and more user-friendly.
 
The following users thanked this post: ricko_uk

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: Spice/simulation tools
« Reply #12 on: December 09, 2019, 10:53:46 am »
I also recommend ngspice. Not really for someone looking for just point-and-click software, though, IMO. (Although KiCad now integrates it, but haven't tried a lot.)
LTSpice is usually much faster though, and more user-friendly.

I agree with the part  "more user-friendly"

But "fast" does not match because there is no way to compare them.

LTSpice became to much biased to their own product line
and to complicate things further their "MODELS" are proprietary
all models are VDMOS based and PSPICE compatibility is limited
to say the least.

Now that ngspice supports VDMOS natively you can use public
PSPICE models and still simulate even LTSpice based ones

Once SPICE itself is fully programmable with data logging and
post analysis function there is no way simple  to "compare" that
visually oriented interface with such programmable data-logger one.

Results are not even close. And "faster" may just be for
some particular models they have crafted for their own (proprietary) use

Reason why they are "faster" - does not mean better.

They are too much biased today  - IMHO
Paul
« Last Edit: December 09, 2019, 10:59:54 am by PKTKS »
 
The following users thanked this post: ricko_uk

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15285
  • Country: fr
Re: Spice/simulation tools
« Reply #13 on: December 09, 2019, 03:10:20 pm »
I also recommend ngspice. Not really for someone looking for just point-and-click software, though, IMO. (Although KiCad now integrates it, but haven't tried a lot.)
LTSpice is usually much faster though, and more user-friendly.

I agree with the part  "more user-friendly"

But "fast" does not match because there is no way to compare them.

Yes there is. Just simulate the same circuit with the same Spice base elements. LTspice is a Spice-based simulator before anything else. Sure it supports in-house models but you don't have to use them.

LTSpice has a multi-threaded engine (and even if it's not optimal, you still get significant speed increase compared to single-threaded typically) and has been optimized for speed all in all for years. This was not the case for ngspice, which I think had more accuracy as a goal than speed. There is a multi-threaded version of ngspice (I think based on OpenMP?) but I've never gotten around to using it - there is no official binary, I don't think the dev teams guarantees anything with it, and I couldn't manage to built it (but some may have).

Again, just take the same Spice circuit, with only base elements, and compare.
 
The following users thanked this post: ricko_uk

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: Spice/simulation tools
« Reply #14 on: December 09, 2019, 03:38:16 pm »

Yes there is. Just simulate the same circuit with the same Spice base elements. LTspice is a Spice-based simulator before anything else. Sure it supports in-house models but you don't have to use them.

LTSpice has a multi-threaded engine (and even if it's not optimal, you still get significant speed increase compared to single-threaded typically) and has been optimized for speed all in all for years. This was not the case for ngspice, which I think had more accuracy as a goal than speed. There is a multi-threaded version of ngspice (I think based on OpenMP?) but I've never gotten around to using it - there is no official binary, I don't think the dev teams guarantees anything with it, and I couldn't manage to built it (but some may have).

Again, just take the same Spice circuit, with only base elements, and compare.

Done that several times in the last decade while converting
all my stuff from LTSpice (which I used quite a lot a decade ago)
to the new ngspice/spice based syntax.

In the process, which took a while, I also tested across
several different systems some single core, some multicore

Important detail - I ditched MS crappy stuff in the late 90s
no longer capable to support their crappy software and practices.

So all checks were made from pristine sources compiled with
best tool chain at time. Results are likely:
- for single core only their "crafted" models perform faster
- for multi core using POSIX pthread based ngspice may be faster
  at least equivalent if using base PSPICE models

A multithreaded ngspice setup will likely bind:
Code: [Select]
(..) others..
        libfftw3.so.3
        libgomp.so.1
        libgcc_s.so.1
        libpthread.so.0

result being totally managed by gomp and pthread
which in any *NIX system is quite damn good and superior
thread controlled -  only EXCEPTION really is when their
crafted models - which only their version of spice can handle
play a role

All other cases from 00's to something like 2015 (when I
completed ditched LTSpice - as all my stuff was converted)
were checked under WINE - which indeed is multithreaded
via the same pthread bindings...

Final opinion is that LTSpice only matters today **IF**:
- you really need their stuff -- models and crafted version of
  a particular class -e.g. their products
- you really need or want or like their netlist "CAPTURE" interface

Otherwise today KiCAD can CAPTURE your netlist
and the multi threaded bindings of ngspice will do
a much similar or sometimes better result..

You see.. you have a "FAST" and an ACCURATE choice
in SPICE using method=gear or method=trap which
indeed produce far different results (and speeds)

A good crafted MODEL will perform just fine and equally fast
in your multi threaded (gomp/pthreaded) binary as it will
in the modified LTSpice version of spice if using plain models

Assuming your simul will converge. Which in some cases
their modified version also performs different - impossible to say
"how" but sometimes  while one method converges others fail

Final details which do matter as well are SPICE options for
convergence like: reltol  abstol vntol  ramptime  accurate

they all produce quite different results - not available in LTSpice
that simple to programmable chekcs...

Paul
« Last Edit: December 09, 2019, 03:45:41 pm by PKTKS »
 
The following users thanked this post: ricko_uk


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf