Does any of the common circuit simulation software provide the system equations? Deriving a system of 1st-order differential equations for a circuit by hand is kind of a pain. And yes, I know that the simulators will actually run the simulations for me, but there are some cases where I'd really be interested just to see what the equations are. Which, if any, circuit simulators would provide them?


What I am specifically looking for here is, I would like to be able to enter my circuit into the software, just like you would do for simulation, but besides run the simulation, I'd also like to have the software show me the equations that it has derived and uses to run the simulation - the system of differential equations that says what the rates-of-change of the system state variables are. This could be a system of equations or it could be in matrix form, doesn't matter.

  • \$\begingroup\$ Excellent question! \$\endgroup\$ – drxzcl Feb 16 '11 at 9:30

As far as I remember the SPICE algorithms you do not want its internal matrices dumped on you. Also I believe for transient analysis it converts all capacitors to voltage sources (and inductors to current sources) for every time step and solves the non-linear circuit like a DC one. So there are no true differential equations in SPICE.

That said, SPICE could output the transfer function of the circuit; IIRC as a list of polynomial coefficients. This sometimes suffers heavily from rounding errors but for simple circuits it may be what you are looking for.

  • \$\begingroup\$ i'm definitely getting the impression that i misapprehended how simulators work. if a trusted tool like SPICE doesn't need to derive equations, doesn't seem likely anyone else would bother. so i'll accept this for now. \$\endgroup\$ – JustJeff Apr 30 '11 at 13:39
  • \$\begingroup\$ SPICE handles non-linear devices, and then setting up state equations is not possible. \$\endgroup\$ – Marcel Hendrix Jun 14 '16 at 12:08

SNAP - symbolic, semisymbolic, and numerical analysis of electronic circuits


very useful


I don't know of any tool that does this automatically. It isn't a lot of work though to use a sci-lab script and a set of matrices to do it. Use ideal Op-amp assumptions for your actives. You can write one matrix and pull transfer functions for just about any point on the circuit.

Circuit magic seems able to do some of this. http://www.circuit-magic.com/

  • \$\begingroup\$ Have a look at SCAM: %This program takes a netlist (similar to SPICE), parses it to derive the %circuit equations, then solves them symbolically. % %Full documentation available at www.swarthmore.edu/NatSci/echeeve1/Ref/mna/MNA1.html % \$\endgroup\$ – Marcel Hendrix Jun 14 '16 at 12:24

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.