24
\$\begingroup\$

I've recently realized that I can't do everything easily in ngspice, mainly because analysis has to be performed through the interpreter. I'm considering switching to a new SPICE simulator.

I'd like a list the advantages and disadvantages of the following SPICE simulators as well as experiences with the various simulators:

HSPICE
LTspice
ngspice
PSpice

I'm well aware HSPICE is an expensive proprietary simulator, but I am able to get access to it, problem is I'd have to access it on a sever via SSH.

LTspice is already free, but not installed on my Windows 7 machine.

Already using ngspice in Fedora Linux.

PSpice available to me on my university's computers. I refuse to install it on my own computer, because it messes with the registry a bit too much.

\$\endgroup\$
  • 10
    \$\begingroup\$ LT Spice is almost always well spoken of, and the price is right. \$\endgroup\$ – Russell McMahon Aug 30 '11 at 3:29
  • \$\begingroup\$ @Russell It seems alright, but would you recommend it over a full version of Cadence Orcad w/ PSpice? \$\endgroup\$ – sj755 Aug 30 '11 at 3:34
11
\$\begingroup\$

I would say that depends heavily on what you need it for. Often the expensive spices are part of some e.g PCB design tool. I'm just trying out MultiSIm from NI (expensive orcad type tool), and it has lots of pretty virtual instruments (e.g scope, distortion analyser, etc) and monte carlo analysis (which LTspice does not have a "convenient" version of - it does have some functions you can use though as Vlad points out, here is a link on using them) but to be honest I find that 99% of things I could do on LTspice.
I find the LTspice setup is by far the quickest out of any spice I have tried, once you get used to the key commands. R for resistor, D for diode, is much easier than clicking the picture (or even selecting from a pop up box in MultiSims case, arghh) and dragging to the right place every time.
You can have a circuit done in seconds this way.

The manual is not as pretty either, but all the info you need is there regarding how to use, eg. the .param, .step and .measure commands for doing things like running an analysis many times and varying parameters. I just tried to run a transfer function analysis in MultiSim in this manner (i.e. run may times and vary a parameter then plot results) but despite reading/wrestling for hours with it, I couldn't manage it, but a quick addition of .step V2 -15 15 1 to the sheet made it possible in LTspice.
I'm sure some of the above is simply as I'm new to MultiSim, and no doubt I am missing something (as the above example simply must be possible in a tool like that) and no I don't work for LT :-) but it has been the only spice that I have used regularly for the last few years. The main point is that it will do all the normal stuff as good (and probably faster) than the expensive tools, but if you need the extras (e.g. monte carle, PCB level anaysis based on actual routing/IBIS models - Altium does this excellently) and all wrapped up in one design tool then you may need more than if can offer.
In my view it can't hurt much to have around even if you do need a more powerful tool anyway.

\$\endgroup\$
  • 5
    \$\begingroup\$ LTspice does have Monte-Carlo and Worst-case analysis, but, true, it's not something that can be readily found. Here's a link with more details, it covers up more than I could in this comment: k6jca.blogspot.ro/2012/07/… . @sj755: For my part, I'd recommend LTspice for it's speed and malleability. If, however, you want prettyness, LTspice is not the tool. \$\endgroup\$ – Vlad Oct 11 '12 at 8:48
  • 1
    \$\begingroup\$ @Vlad - thanks, I actually know about the functions (I use them myself) so I should have mentioned them (will add the link now). I guess the point is more that they are not as convenient as other simulators to use. Having said that, LTSpice is by far my favourite simulator, once you get to know it properly it's very powerful, and you can do things very quickly and easily. \$\endgroup\$ – Oli Glaser Oct 11 '12 at 15:47
  • 2
    \$\begingroup\$ My comment was supposed to add up to your response, but sometimes I can be quite spartan, I still don't know whether I should feel prowd or not :) \$\endgroup\$ – Vlad Oct 12 '12 at 10:36
  • 2
    \$\begingroup\$ @Vlad - It's definitely good you pointed this out, as it is an important bit of info, and silly of me to have missed it out in the first place. \$\endgroup\$ – Oli Glaser Oct 12 '12 at 10:59
20
\$\begingroup\$

My short answer is to just go with LTSpice, it is one of the best simulators on the market and it is free. You can't really beat that. But if you would like a breakdown feel free to read my personal opinions.

HSPICE:

  • Advantages: HSPICE is widely considered one of the most accurate simulators on the market. However I have no actual experience using it.
  • Disadvantages: As you said, it is expensive, proprietary, and as far as I know has no schematic capture features.
  • Overall: If you REQUIRE reliable results (Military or high end industrial) then HSPICE is the way to go. Otherwise, I would avoid it.

LTSpice:

  • Advantages: If you are doing power electronics this simulator is tuned for simulating switching events, as well as some other things which make it perfect for this field. Additionally, it has (IMO) an intuitive interface and doesn't try to hide the netlist from you. Plus, it is FREE.
  • Disadvantages: ? I haven't been made aware of any, it isn't considered quite as accurate as HSPICE, but it isn't inaccurate by any means.
  • Overall: This is the simulator I would suggest. It is easy to use, it is free, and it is supported by a much larger company. (Linear Technology)

ngspice:

  • Overall: I don't know enough about ngspice to give a full overview. I only recently downloaded it and am still working on compiling it for my system. Obviously you have found one of the drawbacks is being limited to the command line.

PSPICE:

  • Advantages: Well this is as close as you can get to the original SPICE. PSPICE is powerful, has a well established simulator, built in results viewer, and an extensive model library.
  • Disadvantages: Unfortunately it has become so bloated in recent years that it is difficult to recommend. And as you would probably like to have it on your computer, I would bet this one is out of your price range unless you have $20,000 laying around.
  • Overall: Powerful and well established, but going downhill fast. Expensive.
\$\endgroup\$
6
\$\begingroup\$

I don't have experience with HSPICE, but use LTspice and NGSPICE very frequently. In my field (power electronics), I have observed fellow engineers actively refuse to work with the company-supplied Pspice after being exposed to LTspice.

Unfortunately, LTspice is closed source, has no scripting possibility, and you can't add (your own) code models to it. When you need these more advanced options (not many people do or care) NGSPICE is the way to go. It's open source, incorporates XSPICE, KLU, open-mp and CUA, and has a C-shell type interpreter with very advanced possibilities (but IMHO a horrible user interface). It does not have schematic entry but there are solutions for that (e.g. LTspice). NGSPICE can be used with gnuplot for very nice, programmable, graphical output.

\$\endgroup\$
  • \$\begingroup\$ Note that the free and open source PCB design tool, KiCad 5, now incorporates NgSpice under the hood too. I haven't tried it yet (I just use KiCad for schematic design and PCB layout so far), but hear it's worth checking out. KiCad Ngspice turorial and getting started: ngspice.sourceforge.net/ngspice-eeschema.html. \$\endgroup\$ – Gabriel Staples Nov 19 '18 at 19:52
2
\$\begingroup\$

I recently fought with the same battle as you trying to get a decent spice package and being on a Linux machine definitely does not help matters.

I used NI Multisim in school and its a fantastic interactive SPICE package. I love the fact you can watch a virtual scope and turn pot's to see real responses. The downside with it is I found it to be less than accurate when dealing with small signals and waveform performance in general. I still use it when coming up with circuit ideas until I have a pretty good idea of the design then I move to a better package for fine tuning things.

The best package I have used for hardcore SPICE has been SIMetrix. They have a free version that works on Linux too. Its the most accurate package I have used so far and has all the complicated options that require reading the manual quite a few times over to understand.

Here are examples of how I use both packages. In Multisim, I was making a transistor tester and needed to create a square wave with 0deg, 120deg, 240deg output via a schmitt hex buffer. Multisim did a swell job and visually lit up LED's like it would in real life when a transistor was put in the circuit. I used SIMetrix when I was making an amp for sound system that required a noise floor of >100dB.

\$\endgroup\$
1
\$\begingroup\$

As an addition to the previous answers, LTspice is a great freeware with limited possibilities on the digital parts: ibis models are not considered at the exception if you own/develop/find a software.

ngspice handles ibis file as well as mixed mode simulation (Verilog-AMS + Spice) if you install ADMSXml components. Unfortunately, this extension is tough to install and use (create a component/compile it/refresh/use it).

Pspice as a daughter of Cadence is very powerful and well known. Nevertheless, the free version allows a limited number of component, and quite slow in everyday use.

XSpice is ngspice like with multi threaded and shared processes possibilities to speed up simulations.

Then you can also use TINA from Texas Instrument which is free and allows as LTspice a bit of extra digital and ibis model. As a designer you should oftenly pay attention to the noise of your circuit and sadly only commercial one support well the noise consideration (Cadence, HSpice, UltraSim, ... and Xspice).

\$\endgroup\$
1
\$\begingroup\$

Ngspice is not limited to the command line. One may include a scripting block in the netlist which is quite powerful.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.