I'm going to sorta disagree with Olin.

If you're using a simulator for something you can do with a calculator and a piece of paper in a few minutes then you're using the simulator for the wrong purpose. If you assume that your 'napkin math' analysis will hold up in reality you're likely working on extremely simple, basic circuits in the first place.

More importantly you're really saying that it's OK to skip what is really the most important stage of pre-prototype design verification. This is a really bad idea if you're working on anything even moderately complex and very much can come back to bite you even on simple circuits. I've seen even the simplest IR transmitter oscillate due to parasitics.

Additionally, a huge use case of simulation that is a real pain to do with just a calculator is Montecarlo analysis. Almost every simulator supports this and it is very important for production designs.

It's actually very rare that a simulator will not give you more insight into a real circuit than a 2-minute, mostly intuition-based, analysis of the circuit will. A couple of hours generating the simulation can easily save you days waiting to get a prototype back only to find out that through some awkward component or parasitic interactions your theoretically perfect transmitter is just a lousy oscillator.

As an example, taken from an Analog Devices app note:

On the left we see a basic op amp circuit. On the right we see what this circuit would look like if one considers basic PCB parasitic effects.

No question that with 60 seconds and a calculator you can figure out what the circuit on the left is doing.

However, that is no substitute for producing a more complex model of the real circuit in the real application such as the circuit to the right. The right hand circuit is far from easy to analyze manually without hand-waving away components as irrelevant.

Additionally a proper simulation is going to use more realistic models for components, rather than the ideal models, which for a circuit of any complexity or speed is critically important to understand and analyze.

As to the original question:

Most circuit simulators are at least related to SPICE and many share a compatible or close to compatible model format. Additionally there are many other simulators which specialize in particular fields. Notably RF/microwave simulation, digital logic simulation, etc.

The most common simulators I've run into:

- PSPICE - part of Cadence's OrCAD design package
- Spectre - Mixed signal and RF simulator from Cadence (maybe the most common)
- NI MutiSim - National Instruments simulation package
- HSPICE - commerical SPICE implementation by Synopsis, also very popular
- XSPICE - extended version of SPICE3, Altium uses this
- SIMetrix - SPICE derived analog simulation

Which one(s) you will see in a given company is usually a function of their field of specialty (analog, mixed-signal, RF, etc), what integrates well in their chosen development environment and what they are historically comfortable with.

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.

## Best Answer

I've examined the code of the Falstad simulator in some detail. For circuits which consist only of linear components like resistors, switches, and voltage sources (things like logic-gate outputs are considered ground-connected voltage sources for purposes of the simulation) the simulator regards each circuit node, voltage source (connecting two nodes), or wire (likewise) as defining a linear equation and a variable, such that the number of equations and number of variables are always equal. For a circuit node, the variable is the voltage of the node, and the equation computes the total current flowing through it equal to the total current injected by any current sources. For a voltage source or wire (a wire being handled as a voltage source where the potential difference is zero), the equation sets the voltage difference between the two circuit node voltages equal to the required voltage difference, and the variable is the amount of current flowing through the voltage source from one node to the other.

Things like current sources and resistors are not associated with resistors or variables. Instead, current sources increase the total current required for one circuit node (remember each circuit node has an equation which evaluates the total current flowing in and out) and decrease it for the other. Resistors are a little trickier: for each endpoint's equation, the resistor adds terms for the node voltage of each endpoint.

A 100-ohm resistor connecting nodes 1 and 2, for example, would say that each volt increase on node 1 will decrease the current flowing into node 1 by 0.01 amps and increase the current flowing into node 2 by a like amount. Likewise, each volt increase on node 2 would increase the current flowing into node 1 by 0.01 amps and decrease the current flowing into node 2 by a like amount.

Consider a circuit with a 10 volt supply connecting nodes 1 and 5, and 100 ohm resistors connecting node 1 and 2, 2 and 3, 2 and 4, and 3 and 4. Assume further that there's a ground icon on node 1. Thus:

There would be two "voltage sources": the ground lead and the 10 volt supply (which are regarded as equation/variable 5 and 6, respectively). The equations would thus be:

This system of equation may be represented as an NxN matrix plus an N item array. Each equation is represented by a row in the matrix, with values on each row representing the coefficients of each variable. The right-hand side of each equation is stored in the separate array. Before solving the equations, one will know the net current flowing into each node (zero in this case), and the voltage difference between pairs of nodes connected by voltage sources. Solving the equations will yield the voltage at each node and the current flowing through each voltage source.

If the circuit contains capacitors, each of those will be regarded as a voltage source in series with a low-value resistor; after each simulation step, the voltage source will be adjusted according to the amount of current that flowed through it. Inductors will be regarded as high-value resistors which feed current into one and and take it out the other (the amount of current being adjusted according to the voltage across the resistance). For both capacitors and inductors, the value of the resistance will be controlled by the amount of time represented by a simulation step.

More complex circuit elements like transistors are regarded as combinations of voltage sources, current sources, and resistors. Unlike the simpler circuit elements which let everything get processed once per simulation time step, elements like transistors compute their effective resistances etc. based upon the voltages and currents they're seeing, evaluate all the resulting equations, and re-evaluate their resistance based upon the new voltages and currents, re-evaluate the equations, etc. in an effort to reach an equilibrium where their effective resistance is as it should be for the voltage and current the transitor is seeing.

The Falstad simulator can be decently fast for moderate-sized circuits which consist entirely of "linear" elements. The time to repeatedly solve a system of equations is pretty reasonable if the only thing that changes are the right-side coefficients. The time gets much slower if the left side changes (e.g. because a transistor's effective resistance goes up or down) because the system has to "refactor" the equations. Having to do refactor the equations multiple times per simulation step (may be necessary with transistors) makes things slower yet.

Using one big matrix for everything is not a good approach for large simulations; even though the matrix will be fairly sparse, it will take up space proportional to the square of the number of nodes plus voltage sources. The time required to solve the matrix on each simulation step will be proportional to the square of matrix size if refactoring is not required, or to the cube of matrix size if refactoring is required. Nonetheless, the approach does have a certain elegance when it comes to showing the relationship between a circuit and a system of linear equations.