Electronic – software for obtaining differential equations for circuit simulation

mathsimulationsoftware

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?

EDIT ..

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.

Best Answer

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.