From: Sidney M. <swm...@cs...> - 2018-01-22 00:54:36
|
Henry Baker, There are many ways to do this. The simplest is nodal analysis and assumes that the circuit consists of current sources and conductances (G = 1/R). Ohm's law is GE = I where G is the conductance, E is the voltage, and I is the current. Construct an n x n matrix for G, an n x 1 column vector E, and an n x 1 column vector I. If there is a conductance between node j and k add to the G matrix the pattern g -g -g g for the jth and kth rows and columns. If there is a current source between nodes j and k add to the I column vector the pattern i -i Now delete the last row and column from the G matrix and the last entry from the E and I vectors (otherwise the matrix G is singular) and call this (deleted) node the ground node. Solve the matrix equation GE = I for E. E is then the node voltages. Note that the pattern for each row calculates the voltage difference between nodes j and k and when multiplied by the conductance gives the current through the conductance. This is set equal to the current specified by the I vector. If you use complex admittance and complex currents (to specify phase) you can add capacitors and inductors. Capacitors are 2[pi]fiC and inductors are 1/2[pi]iL. Laplace transforms can be done by using g, sC, and 1/sL in the matrix - the right-hand side is then the Laplace Transform of the current source. You can also add voltage sources, inductors, transformers etc. by using different patterns. There is also loop analysis and hybrid analysis systems. Ask if you need more information. References: J. Vlach and K. Singhal, "Computer Methods for Circuit Analysis and Design", Applied Mathematical Sciences, Van Nostrand, New York (1984) - a really good book for this sort of thing Laurence W. Nagel, "SPICE2: A Computer Program to Simulate Semiconductor Circuits", Memorandum No. ERL-M520, Electronics Research Laboratory, College of Engineering, University of California, Berkeley 94720 (9 May 1975) - describes the inner workings of SPICE --Sidney Marshall ----------------------------------------- On Fri, 19 Jan 2018, Henry Baker wrote: > Hi: > > I was looking for a trivial linear circuit analysis example for Maxima. > > I want to show how the circuit of R's, L's, and C's maps into a matrix. > > In particular, the matrix should "mirror" the topology of the circuit. > > Thanks in advance for any pointers. > > Henry Baker > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |