Back to Blog
Qucs matrix solver method7/16/2023 ![]() Matlab certainly has a sparse matrix solver available, but you probably have to invoke it explicitly. ![]() Even Nagel's original 1975 report (Thesis?) on SPICE discusses using sparse matrix methods. How spice managed to solve such a huge system of nonlinear equations quickly and without running out of memory ?Ī good SPICE very likely defaults (or knows when to switch to) a sparse matrix solver, since large circuits typically produce sparse matrices (each node connects to only a small fraction of the branches) it would be an obvious optimization to use (or have available) a sparse matrix solver in a SPICE. Is the DC operating point the simulation type we should be targeting ? i mean should we focus to interface our solver to other types of simulations e.g.In the authors mentioned ISCAS85 benchmark circuits should we consider these circuits in our tests ?.Is this example fair enough ? i mean do we need to consider more practical circuits ? and if so can any one give an example for a circuit(s) where DC operating point simulation might be the bottleneck of the simulation time ?.How spice managed to solve such a huge system of nonlinear equations quickly and without running out of memory ? is it exploiting the circuit structure making use of the repeated elements ?.Though as mentioned in spice uses the damped Newton-Raphson approach to solve circuits with nonlinear components which is the same as all the solvers mentioned above 3,000 the spice solvers always outperform matlab and qucs. We actually have no idea how spice solvers managed to avoid this memory problem, and even when testing this problem against fewer number of unknowns e.g. All the spice based solvers somehow solved this problem in less than 2 seconds.When testing the above solvers against the problem with 70,000 nodes i.e. ![]() Where DI1N4004 is our diode model defined in the netlist. We have also written a script to generate Spice netlist for this problem def gen_ckt(num): We have managed to write this as a matlab function to test this circuit against matlab nonlinear solver algorithms featured in the optimization toolbox. The unknowns x in this set of equations are the voltage nodes and the current at each resistor We have formulated the set of nonlinear equations governing the above circuit as the following The circuit netlist is generated by a script where the number of the nodes is given. We have tested these solvers against a circuit At this point we wanted to compare the performance of our solver against solvers implemented in other circuit simulators such asĪnd also other software solvers e.g. We have picked up an open source simulator and every time the simulator is performing a DC operating point simulation it will invoke our cuda code. We wanted to interface our solver with circuit simulators. We have an assignment at the Parallel processing class, the target is to implement a Non-linear Equations solver on cuda based on Newton Raphson method and to interface this solver with an application that deals with nonlinear set of equations.
0 Comments
Read More
Leave a Reply. |